]> granicus.if.org Git - clang/commitdiff
[CMake] Exclude 'bootstrap' target from 'all' where possible.
authorChris Bieneman <beanz@apple.com>
Thu, 20 Aug 2015 20:12:18 +0000 (20:12 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 20 Aug 2015 20:12:18 +0000 (20:12 +0000)
EXCLUDE_FROM_ALL in ExternalProject is only available on CMake 3.1 and later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245603 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index 382770b10639884e133b21a66130cb2436884f68..4e4ee515444dc3bf6e19e655eb971882f7e80475 100644 (file)
@@ -559,6 +559,10 @@ endif ()
 if (CLANG_ENABLE_BOOTSTRAP)
   include(ExternalProject)
 
+  if(CMAKE_VERSION VERSION_GREATER 3.1.0)
+    set(cmake_3_1_EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL 1)
+  endif()
+
   if(CMAKE_VERSION VERSION_LESS 3.3.20150708)
     set(cmake_3_4_USES_TERMINAL_OPTIONS)
     set(cmake_3_4_USES_TERMINAL)
@@ -594,6 +598,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
     SOURCE_DIR ${CMAKE_SOURCE_DIR}
     STAMP_DIR ${STAMP_DIR}
     BINARY_DIR ${BINARY_DIR}
+    ${cmake_3_1_EXCLUDE_FROM_ALL}
     CMAKE_ARGS
                 # We shouldn't need to set this here, but INSTALL_DIR doesn't
                 # seem to work, so instead I'm passing this through