summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-10-20 18:12:12 +0000
committerChris Bieneman <beanz@apple.com>2015-10-20 18:12:12 +0000
commit0eb2d8794ea3d0b30b97791ef927f819abc4cc65 (patch)
treee673efa78db6c4076249b6f476ac98d523647f97
parent077fe12e5dfe942ec565383c46434476eb31e62c (diff)
downloadbcm5719-llvm-0eb2d8794ea3d0b30b97791ef927f819abc4cc65.tar.gz
bcm5719-llvm-0eb2d8794ea3d0b30b97791ef927f819abc4cc65.zip
[CMake] Make clang/tools subdirectories controlled via options
Setting CLANG_TOOL_*_BUILD=Off on the CMake command line will disable inclusion of a clang/tools subdirectory. llvm-svn: 250840
-rw-r--r--clang/CMakeLists.txt4
-rw-r--r--clang/tools/CMakeLists.txt22
2 files changed, 16 insertions, 10 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 2adcea3231e..b956f4a68bb 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -348,6 +348,10 @@ macro(set_clang_windows_version_resource_properties name)
endif()
endmacro()
+macro(add_clang_subdirectory name)
+ add_llvm_subdirectory(CLANG TOOL ${name})
+endmacro()
+
macro(add_clang_library name)
cmake_parse_arguments(ARG
""
diff --git a/clang/tools/CMakeLists.txt b/clang/tools/CMakeLists.txt
index b2b2f6aa954..891bf842db9 100644
--- a/clang/tools/CMakeLists.txt
+++ b/clang/tools/CMakeLists.txt
@@ -1,19 +1,21 @@
-add_subdirectory(diagtool)
-add_subdirectory(driver)
-add_subdirectory(clang-format)
-add_subdirectory(clang-format-vs)
-add_subdirectory(clang-fuzzer)
+create_subdirectory_options(CLANG TOOL)
-add_subdirectory(c-index-test)
-add_subdirectory(libclang)
+add_clang_subdirectory(diagtool)
+add_clang_subdirectory(driver)
+add_clang_subdirectory(clang-format)
+add_clang_subdirectory(clang-format-vs)
+add_clang_subdirectory(clang-fuzzer)
+
+add_clang_subdirectory(c-index-test)
+add_clang_subdirectory(libclang)
if(CLANG_ENABLE_ARCMT)
- add_subdirectory(arcmt-test)
- add_subdirectory(c-arcmt-test)
+ add_clang_subdirectory(arcmt-test)
+ add_clang_subdirectory(c-arcmt-test)
endif()
if(CLANG_ENABLE_STATIC_ANALYZER)
- add_subdirectory(clang-check)
+ add_clang_subdirectory(clang-check)
endif()
# We support checking out the clang-tools-extra repository into the 'extra'
OpenPOWER on IntegriCloud