From: Pete Cooper Date: Wed, 2 Apr 2014 22:49:58 +0000 (+0000) Subject: Add ability to disable building LLVM utils X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d7e2a4815398dcaf7111c7ab0e4df52afd93a880;p=oota-llvm.git 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ddf7beeb15..624f755fd54 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)