This revision was automatically updated to reflect the committed changes. Closed by commit rG3a1c81e32739: [CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable are better… (authored by Ericson2314).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132316/new/ https://reviews.llvm.org/D132316 Files: clang/cmake/modules/CMakeLists.txt flang/cmake/modules/CMakeLists.txt lld/cmake/modules/CMakeLists.txt lldb/cmake/modules/LLDBConfig.cmake llvm/CMakeLists.txt llvm/cmake/modules/AddLLVM.cmake llvm/cmake/modules/CMakeLists.txt mlir/cmake/modules/CMakeLists.txt polly/cmake/CMakeLists.txt polly/test/CMakeLists.txt
Index: polly/test/CMakeLists.txt =================================================================== --- polly/test/CMakeLists.txt +++ polly/test/CMakeLists.txt @@ -46,7 +46,7 @@ set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}") set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}") -set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") +set(LLVM_LIBS_DIR "${LLVM_LIBRARY_DIR}") if (CMAKE_LIBRARY_OUTPUT_DIRECTORY) set(POLLY_LIB_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) else() Index: polly/cmake/CMakeLists.txt =================================================================== --- polly/cmake/CMakeLists.txt +++ polly/cmake/CMakeLists.txt @@ -12,7 +12,7 @@ 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_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") if (CMAKE_CONFIGURATION_TYPES) set(POLLY_EXPORTS_FILE_NAME "PollyExports-$<LOWER_CASE:$<CONFIG>>.cmake") Index: mlir/cmake/modules/CMakeLists.txt =================================================================== --- mlir/cmake/modules/CMakeLists.txt +++ mlir/cmake/modules/CMakeLists.txt @@ -15,7 +15,7 @@ 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_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") get_property(MLIR_EXPORTS GLOBAL PROPERTY MLIR_EXPORTS) export(TARGETS ${MLIR_EXPORTS} FILE ${mlir_cmake_builddir}/MLIRTargets.cmake) Index: llvm/cmake/modules/CMakeLists.txt =================================================================== --- llvm/cmake/modules/CMakeLists.txt +++ llvm/cmake/modules/CMakeLists.txt @@ -3,7 +3,7 @@ include(FindPrefixFromConfig) # CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below. -set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") # First for users who use an installed LLVM, create the LLVMExports.cmake file. set(LLVM_EXPORTS_FILE ${llvm_cmake_builddir}/LLVMExports.cmake) Index: llvm/cmake/modules/AddLLVM.cmake =================================================================== --- llvm/cmake/modules/AddLLVM.cmake +++ llvm/cmake/modules/AddLLVM.cmake @@ -1093,7 +1093,7 @@ message(FATAL_ERROR "LLVM_INSTALL_PACKAGE_DIR must be defined and writable. GEN_CONFIG should only be passe when building LLVM proper.") endif() # LLVM_INSTALL_PACKAGE_DIR might be absolute, so don't reuse below. - set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") + set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") file(WRITE "${llvm_cmake_builddir}/LLVMConfigExtensions.cmake" "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})") Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -940,9 +940,9 @@ ) # They are not referenced. See set_output_directory(). -set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin ) -set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) -set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) +set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR} ) +set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_LIBRARY_DIR} ) +set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_LIBRARY_DIR} ) if(LLVM_INCLUDE_TESTS) include(GetErrcMessages) Index: lldb/cmake/modules/LLDBConfig.cmake =================================================================== --- lldb/cmake/modules/LLDBConfig.cmake +++ lldb/cmake/modules/LLDBConfig.cmake @@ -276,7 +276,7 @@ # could be and pick the first that exists. foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" "${LLVM_BUILD_LIBRARY_DIR}" - "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") + "${LLVM_LIBRARY_DIR}") # Build the resource directory path by appending 'clang/<version number>'. set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}") if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}") Index: lld/cmake/modules/CMakeLists.txt =================================================================== --- lld/cmake/modules/CMakeLists.txt +++ lld/cmake/modules/CMakeLists.txt @@ -14,7 +14,7 @@ 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_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") get_property(LLD_EXPORTS GLOBAL PROPERTY LLD_EXPORTS) export(TARGETS ${LLD_EXPORTS} FILE ${lld_cmake_builddir}/LLDTargets.cmake) Index: flang/cmake/modules/CMakeLists.txt =================================================================== --- flang/cmake/modules/CMakeLists.txt +++ flang/cmake/modules/CMakeLists.txt @@ -14,7 +14,7 @@ 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_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") get_property(FLANG_EXPORTS GLOBAL PROPERTY FLANG_EXPORTS) export(TARGETS ${FLANG_EXPORTS} FILE ${flang_cmake_builddir}/FlangTargets.cmake) Index: clang/cmake/modules/CMakeLists.txt =================================================================== --- clang/cmake/modules/CMakeLists.txt +++ clang/cmake/modules/CMakeLists.txt @@ -15,7 +15,7 @@ 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_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +set(llvm_cmake_builddir "${LLVM_LIBRARY_DIR}/cmake/llvm") get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits