summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-11-11 05:00:49 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-02 23:40:21 (GMT)
commit6dd410c2b98d5152adf69b5986b5f25d4dcd9e2a (patch)
tree049748f91b8eff7cd31a4a60fb67eaf040a0a1b1 /Source/CMakeLists.txt
parent7eb8d9036c73784f14da9d8381023c1e26df1275 (diff)
downloadCMake-6dd410c2b98d5152adf69b5986b5f25d4dcd9e2a.zip
CMake-6dd410c2b98d5152adf69b5986b5f25d4dcd9e2a.tar.gz
CMake-6dd410c2b98d5152adf69b5986b5f25d4dcd9e2a.tar.bz2
Ninja: Add the Ninja generator
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index b5115b7..7ddabbd 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -353,6 +353,24 @@ IF (WIN32)
ENDIF(NOT UNIX)
ENDIF (WIN32)
+# Ninja only works on UNIX.
+IF(UNIX)
+ SET(SRCS ${SRCS}
+ cmGlobalNinjaGenerator.cxx
+ cmGlobalNinjaGenerator.h
+ cmNinjaTypes.h
+ cmLocalNinjaGenerator.cxx
+ cmLocalNinjaGenerator.h
+ cmNinjaTargetGenerator.cxx
+ cmNinjaTargetGenerator.h
+ cmNinjaNormalTargetGenerator.cxx
+ cmNinjaNormalTargetGenerator.h
+ cmNinjaUtilityTargetGenerator.cxx
+ cmNinjaUtilityTargetGenerator.h
+ )
+ ADD_DEFINITIONS(-DCMAKE_USE_NINJA)
+ENDIF(UNIX)
+
# create a library used by the command line and the GUI
ADD_LIBRARY(CMakeLib ${SRCS})
TARGET_LINK_LIBRARIES(CMakeLib cmsys