Skip to content

Commit ddc29a9

Browse files
hausdorffjmlvanre
authored andcommitted
CMake:[1/2] Moved __WINDOWS__ flag definition to CompilationConfigure.
Review: https://reviews.apache.org/r/39096
1 parent 2bec92c commit ddc29a9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

cmake/CompilationConfigure.cmake

+10-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,16 @@ else (WIN32)
6565
"flag. Please use a different C++ compiler.")
6666
endif (WIN32)
6767

68-
# Convenience flags to simplify Windows support in C++ source.
69-
if (MSVC)
70-
add_definitions(-DMESOS_MSVC)
71-
endif (MSVC)
68+
# Convenience flags to simplify Windows support in C++ source, used to #ifdef
69+
# out some platform-specific parts of Mesos. We choose to define a new flag
70+
# rather than using an existing flag (e.g., `_WIN32`) because we want to give
71+
# the build system fine-grained control over what code is #ifdef'd out in the
72+
# future. Using only flags defined by our build system to control this logic is
73+
# the clearest and most stable way of accomplishing this.
74+
if (WIN32)
75+
add_definitions(-D__WINDOWS__)
76+
endif (WIN32)
77+
7278

7379
# Configure directory structure for different platforms.
7480
########################################################

0 commit comments

Comments
 (0)