diff options
author | Pete Cooper <peter_cooper@apple.com> | 2014-04-02 22:49:58 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2014-04-02 22:49:58 +0000 |
commit | d7e2a4815398dcaf7111c7ab0e4df52afd93a880 (patch) | |
tree | 5a28e8cc6e8d9aa2ed411f93c4507f45a449cc4c /CMakeLists.txt | |
parent | 1fb3df7a2e210e31ae111ecfaf704068061e140a (diff) | |
download | llvm-d7e2a4815398dcaf7111c7ab0e4df52afd93a880.tar.gz llvm-d7e2a4815398dcaf7111c7ab0e4df52afd93a880.tar.bz2 llvm-d7e2a4815398dcaf7111c7ab0e4df52afd93a880.tar.xz |
Add ability to disable building LLVM utils
Patch by Chris Bieneman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ddf7beeb1..624f755fd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,6 +273,8 @@ option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON) 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) |