r201799 - [CMake] Fix installation without CLANG_BUILD_EXAMPLES
Jordan Rose
jordan_rose at apple.com
Thu Feb 20 09:43:31 PST 2014
Author: jrose
Date: Thu Feb 20 11:43:31 2014
New Revision: 201799
URL: http://llvm.org/viewvc/llvm-project?rev=201799&view=rev
Log:
[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!
Modified:
cfe/trunk/examples/CMakeLists.txt
Modified: cfe/trunk/examples/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/CMakeLists.txt?rev=201799&r1=201798&r2=201799&view=diff
==============================================================================
--- cfe/trunk/examples/CMakeLists.txt (original)
+++ cfe/trunk/examples/CMakeLists.txt Thu Feb 20 11:43:31 2014
@@ -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)
More information about the cfe-commits
mailing list