Skip to content

Commit e3c54ee

Browse files
Keenutsgithub-actions[bot]
authored andcommitted
Automerge: Revert "[clang] fix clang_cmake_builddir" (#158684)
Reverts llvm/llvm-project#155844 Romaric is OOO for the next 2 weeks and I don't have the context on the other part (clspv) to propose a fix forward. Reverting for now.
2 parents 25dad82 + 82830e8 commit e3c54ee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/cmake/modules/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ include(FindPrefixFromConfig)
88
# the usual CMake convention seems to be ${Project}Targets.cmake.
99
set(CLANG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/clang" CACHE STRING
1010
"Path for CMake subdirectory for Clang (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/clang')")
11+
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
12+
set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang")
1113

1214
# Keep this in sync with llvm/cmake/CMakeLists.txt!
1315
set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
1416
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
1517
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
16-
string(REPLACE "${CMAKE_CFG_INTDIR}" "." llvm_builddir "${LLVM_LIBRARY_DIR}")
17-
set(llvm_cmake_builddir "${llvm_builddir}/cmake/llvm")
18-
set(clang_cmake_builddir "${llvm_builddir}/cmake/clang")
18+
string(REPLACE "${CMAKE_CFG_INTDIR}" "." llvm_cmake_builddir "${LLVM_LIBRARY_DIR}")
19+
set(llvm_cmake_builddir "${llvm_cmake_builddir}/cmake/llvm")
1920

2021
get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS)
2122
export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake)

0 commit comments

Comments
 (0)