File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,14 @@ if(BUILD_FROM_SOURCE)
111
111
# Build from source
112
112
#-----------------------------------------------------------------------------
113
113
set (ninja_executable ${Ninja_SOURCE_DIR} /ninja${CMAKE_EXECUTABLE_SUFFIX} )
114
+
115
+ set (bootstrap_command ${PYTHON_EXECUTABLE} configure.py --bootstrap)
116
+ # Explicitly defining _BSD_SOURCE is required to support building the wheel on Alpine. See issue #22
117
+ if (UNIX AND NOT APPLE )
118
+ set (bootstrap_command -E env ${CMAKE_COMMAND} CXXFLAGS=-D_BSD_SOURCE ${bootstrap_command} )
119
+ endif ()
114
120
add_custom_command (
115
- COMMAND ${PYTHON_EXECUTABLE} configure.py --bootstrap
121
+ COMMAND ${bootstrap_command}
116
122
OUTPUT ${ninja_executable}
117
123
WORKING_DIRECTORY ${Ninja_SOURCE_DIR}
118
124
)
You can’t perform that action at this time.
0 commit comments