[llvm] r205478 - Add ability to disable building LLVM utils
Pete Cooper
peter_cooper at apple.com
Wed Apr 2 15:49:58 PDT 2014
Author: pete
Date: Wed Apr 2 17:49:58 2014
New Revision: 205478
URL: http://llvm.org/viewvc/llvm-project?rev=205478&view=rev
Log:
Add ability to disable building LLVM utils
Patch by Chris Bieneman
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=205478&r1=205477&r2=205478&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Wed Apr 2 17:49:58 2014
@@ -273,6 +273,8 @@ option(LLVM_INCLUDE_TOOLS "Generate buil
option(LLVM_BUILD_TOOLS
"Build the LLVM tools. If OFF, just generate build targets." ON)
+option(LLVM_INCLUDE_UTILS "Generate build targets for the LLVM utils." ON)
+
option(LLVM_BUILD_RUNTIME
"Build the LLVM runtime libraries." ON)
option(LLVM_BUILD_EXAMPLES
@@ -492,12 +494,19 @@ add_subdirectory(include/llvm)
add_subdirectory(lib)
-add_subdirectory(utils/FileCheck)
-add_subdirectory(utils/FileUpdate)
-add_subdirectory(utils/count)
-add_subdirectory(utils/not)
-add_subdirectory(utils/llvm-lit)
-add_subdirectory(utils/yaml-bench)
+if( LLVM_INCLUDE_UTILS )
+ add_subdirectory(utils/FileCheck)
+ add_subdirectory(utils/FileUpdate)
+ add_subdirectory(utils/count)
+ add_subdirectory(utils/not)
+ add_subdirectory(utils/llvm-lit)
+ add_subdirectory(utils/yaml-bench)
+else()
+ if ( LLVM_INCLUDE_TESTS )
+ message(FATAL_ERROR "Including tests when not building utils will not work.
+ Either set LLVM_INCLUDE_UTILS to On, or set LLVM_INCLDE_TESTS to Off.")
+ endif()
+endif()
if(LLVM_INCLUDE_TESTS)
add_subdirectory(utils/unittest)
More information about the llvm-commits
mailing list