summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-06-09 22:38:40 +0000
committerChris Bieneman <beanz@apple.com>2016-06-09 22:38:40 +0000
commitf5a39c169254a1e1830e7098fa92e0866259a388 (patch)
treeeec0e442e51c16da931d15c3075ac0cb9e95cbb4 /CMakeLists.txt
parent2486f3141fabe3242a40007893809c9c5bac2702 (diff)
[CMake] Version is aways greater than 3
We don't need any checks for this code anymore. Since CMake version is always greater than 3 we can always generate the exports file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt47
1 files changed, 22 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 40ba3fdd31..d1cbd3606a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -606,31 +606,28 @@ if(APPLE)
endif()
endif()
-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.
- set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
- set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")
- get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS)
- export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake)
-
- # Install a <prefix>/lib/cmake/clang/ClangConfig.cmake file so that
- # find_package(Clang) works. Install the target list with it.
- install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
-
- install(FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
-
- # Also copy ClangConfig.cmake to the build directory so that dependent projects
- # can build against a build directory of Clang more easily.
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
- ${CLANG_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake
- COPYONLY)
-endif ()
+# 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.
+set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
+set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")
+get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS)
+export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake)
+
+# Install a <prefix>/lib/cmake/clang/ClangConfig.cmake file so that
+# find_package(Clang) works. Install the target list with it.
+install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
+
+install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
+ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
+
+# Also copy ClangConfig.cmake to the build directory so that dependent projects
+# can build against a build directory of Clang more easily.
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
+ ${CLANG_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake
+ COPYONLY)
if (CLANG_ENABLE_BOOTSTRAP)
include(ExternalProject)