summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorNhat Nguyen <honguye@microsoft.com>2023-01-13 20:26:02 +0100
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>2023-01-13 20:32:59 +0100
commiteb4aa6c7a5f22583e319aaaae3f6ee73cbc5464a (patch)
tree3879952a5dd4ac56941d2a30c37c93d7b23d906c /polly
parent4d8b99af7391f46afb0f82117515bc682d319371 (diff)
downloadllvm-eb4aa6c7a5f22583e319aaaae3f6ee73cbc5464a.tar.gz
[cmake] Fix path to LLVMConfig.cmake for multi-config builds
D139623 replaces CMAKE_CFG_INTDIR with '.' for multi-config builds. However, this change has not been reflected in mlir, flang, polly, lld, and clang. The patch updates the path to LLVMConfig.cmake for those projects. Reviewed By: sebastian-ne Differential Revision: https://reviews.llvm.org/D141538
Diffstat (limited to 'polly')
-rw-r--r--polly/cmake/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt
index d7b3fa1f29d8..b6181fbe4cc5 100644
--- a/polly/cmake/CMakeLists.txt
+++ b/polly/cmake/CMakeLists.txt
@@ -12,7 +12,8 @@ set(polly_cmake_builddir "${POLLY_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/pol
set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
-set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm")
+string(REPLACE "${CMAKE_CFG_INTDIR}" "." llvm_cmake_builddir "${LLVM_LIBRARY_DIR}")
+set(llvm_cmake_builddir "${llvm_cmake_builddir}/cmake/llvm")
if (CMAKE_CONFIGURATION_TYPES)
set(POLLY_EXPORTS_FILE_NAME "PollyExports-$<LOWER_CASE:$<CONFIG>>.cmake")