summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSibi <44207430+SibiSiddharthan@users.noreply.github.com>2019-11-02 12:13:58 (GMT)
committerSibi <44207430+SibiSiddharthan@users.noreply.github.com>2019-11-02 12:13:58 (GMT)
commit980bc03f53f5f07f625c2f231a241971c2cf385d (patch)
treed40bdc1a1568da9242b0c5c2d015aabdc2d6ac01 /CMakeLists.txt
parent40d45a7bb3bd07d50562a468f9c550f555eb2f8a (diff)
downloadNinja-980bc03f53f5f07f625c2f231a241971c2cf385d.zip
Ninja-980bc03f53f5f07f625c2f231a241971c2cf385d.tar.gz
Ninja-980bc03f53f5f07f625c2f231a241971c2cf385d.tar.bz2
Fixed compilation by gcc on Windows
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f609c04..2390732 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,11 @@ else()
target_sources(libninja PRIVATE src/subprocess-posix.cc)
endif()
+#Fixes GetActiveProcessorCount on MinGW
+if(MINGW)
+target_compile_definitions(libninja PRIVATE _WIN32_WINNT=0x0601)
+endif()
+
# Main executable is library plus main() function.
add_executable(ninja src/ninja.cc)
target_link_libraries(ninja PRIVATE libninja libninja-re2c)