aboutsummaryrefslogtreecommitdiff
path: root/flang/cmake
diff options
context:
space:
mode:
authorSebastian Neubauer <Sebastian.Neubauer@amd.com>2022-07-26 10:40:48 +0200
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>2022-07-26 11:24:23 +0200
commitae222dae56b9345238ae2422f449736be6264f5b (patch)
treec45e61a43ae08231df75accd11ca688818b99270 /flang/cmake
parentae16b2ed9871b5624fdcb4286fbd0d6ddfd88961 (diff)
downloadllvm-ae222dae56b9345238ae2422f449736be6264f5b.zip
llvm-ae222dae56b9345238ae2422f449736be6264f5b.tar.gz
llvm-ae222dae56b9345238ae2422f449736be6264f5b.tar.bz2
[CMake] Fix add_subdirectory llvm builds
Fixes a regression from D117973, that used CMAKE_BINARY_DIR instead of LLVM_BINARY_DIR in some places. Differential Revision: https://reviews.llvm.org/D130555
Diffstat (limited to 'flang/cmake')
-rw-r--r--flang/cmake/modules/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/cmake/modules/CMakeLists.txt b/flang/cmake/modules/CMakeLists.txt
index 2827c2b..105cc09 100644
--- a/flang/cmake/modules/CMakeLists.txt
+++ b/flang/cmake/modules/CMakeLists.txt
@@ -14,7 +14,7 @@ set(flang_cmake_builddir "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/fla
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 "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
get_property(FLANG_EXPORTS GLOBAL PROPERTY FLANG_EXPORTS)
export(TARGETS ${FLANG_EXPORTS} FILE ${flang_cmake_builddir}/FlangTargets.cmake)