]> granicus.if.org Git - clang/commitdiff
[CMake] Always generate and install cmake config files on CMake>=3.0.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 10 Oct 2015 02:37:30 +0000 (02:37 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 10 Oct 2015 02:37:30 +0000 (02:37 +0000)
Currently, cmake config files are only generated and installed when CLANG_BUILD_STANDALONE set, which means config file will not be generated or installed when clang is built with llvm. This change removes that restriction.

Thanks to Don Hinton <hintonda@gmail.com>

http://reviews.llvm.org/D13453

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249935 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index 232517037287b020bcbd07410207ef858e19a744..2adcea3231ec872d06292178f78c1cadf077e893 100644 (file)
@@ -550,7 +550,8 @@ endif()
 set(CLANG_ORDER_FILE "" CACHE FILEPATH
   "Order file to use when compiling clang in order to improve startup time.")
 
-if (CLANG_BUILT_STANDALONE)
+if (CLANG_BUILT_STANDALONE OR CMAKE_VERSION VERSION_EQUAL 3 OR
+    CMAKE_VERSION VERSION_GREATER 3)
   # Generate a list of CMake library targets so that other CMake projects can
   # link against them. LLVM calls its version of this file LLVMExports.cmake, but
   # the usual CMake convention seems to be ${Project}Targets.cmake.