[PATCH] D32577: CMake: Replace open-coded find_package
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 12 19:19:17 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346731: CMake: Replace open-coded find_package (authored by tstellar, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D32577
Files:
cfe/trunk/CMakeLists.txt
Index: cfe/trunk/CMakeLists.txt
===================================================================
--- cfe/trunk/CMakeLists.txt
+++ cfe/trunk/CMakeLists.txt
@@ -68,13 +68,8 @@
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)
- set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
- if(EXISTS ${LLVMCONFIG_FILE})
- list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
- include(${LLVMCONFIG_FILE})
- else()
- message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
- endif()
+ find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_PATH}")
+ list(APPEND CMAKE_MODULE_PATH ${LLVM_DIR})
# They are used as destination of target generators.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32577.173806.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181113/3bc8d4dd/attachment.bin>
More information about the cfe-commits
mailing list