summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-02-20 17:43:31 +0000
committerJordan Rose <jordan_rose@apple.com>2014-02-20 17:43:31 +0000
commitdac75e7a51ea0a8cd8e5dd8a5eb32661f3d30b8c (patch)
treeae04f2445ef1b5e292d3a17172ce621594a59006 /examples
parent0b31fa9e86bd39ee74a41f7f5ecfa71a68623d49 (diff)
[CMake] Fix installation without CLANG_BUILD_EXAMPLES
When CLANG_BUILD_EXAMPLES is not on we set the EXCLUDE_FROM_ALL directory property for the examples/ directory to tell CMake not to build them by default. The AddLLVM.cmake APIs are not aware of this and try to install targets that are not built. This does not cause an install-time error because CMake excludes the directory from the default installation. However, now that installation attaches targets to the LLVMExports export set CMake-based applications that find_package(LLVM) fail because the example plugin binary is not available. Tell the AddLLVM.cmake APIs to exclude the examples from installation by setting the EXCLUDE_FROM_ALL variable they check. Patch by Brad King! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 6213bc7c2a..5d4b5fcdb0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,5 +1,6 @@
if(NOT CLANG_BUILD_EXAMPLES)
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
+ set(EXCLUDE_FROM_ALL ON)
endif()
if(CLANG_ENABLE_STATIC_ANALYZER)