r250840 - [CMake] Make clang/tools subdirectories controlled via options
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 11:12:12 PDT 2015
Author: cbieneman
Date: Tue Oct 20 13:12:12 2015
New Revision: 250840
URL: http://llvm.org/viewvc/llvm-project?rev=250840&view=rev
Log:
[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.
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/tools/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=250840&r1=250839&r2=250840&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Tue Oct 20 13:12:12 2015
@@ -348,6 +348,10 @@ macro(set_clang_windows_version_resource
endif()
endmacro()
+macro(add_clang_subdirectory name)
+ add_llvm_subdirectory(CLANG TOOL ${name})
+endmacro()
+
macro(add_clang_library name)
cmake_parse_arguments(ARG
""
Modified: cfe/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CMakeLists.txt?rev=250840&r1=250839&r2=250840&view=diff
==============================================================================
--- cfe/trunk/tools/CMakeLists.txt (original)
+++ cfe/trunk/tools/CMakeLists.txt Tue Oct 20 13:12:12 2015
@@ -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'
More information about the cfe-commits
mailing list