[PATCH] D107717: [NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project
gAlfonso-bit created this revision. gAlfonso-bit added a project: LLVM. Herald added subscribers: libcxx-commits, tstellar, mgorny. Herald added a reviewer: MaskRay. Herald added a project: libunwind. Herald added a reviewer: libunwind. gAlfonso-bit requested review of this revision. Herald added projects: clang, Sanitizers, LLDB, libc++. Herald added subscribers: llvm-commits, lldb-commits, Sanitizers, cfe-commits. Herald added a reviewer: libc++. This way, we do not need to set LLVM_CMAKE_PATH to LLVM_CMAKE_DIR when (NOT LLVM_CONFIG_FOUND) Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D107717 Files: clang/CMakeLists.txt clang/lib/Basic/CMakeLists.txt compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake compiler-rt/cmake/Modules/CompilerRTUtils.cmake flang/CMakeLists.txt libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake libunwind/CMakeLists.txt lld/CMakeLists.txt lld/Common/CMakeLists.txt lldb/cmake/modules/LLDBStandalone.cmake lldb/source/CMakeLists.txt llvm/CMakeLists.txt llvm/include/llvm/Support/CMakeLists.txt runtimes/CMakeLists.txt Index: runtimes/CMakeLists.txt === --- runtimes/CMakeLists.txt +++ runtimes/CMakeLists.txt @@ -65,7 +65,7 @@ # This variable makes sure that e.g. llvm-lit is found. set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) -set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) +set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules) # This variable is used by individual runtimes to locate LLVM files. set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR}) Index: llvm/include/llvm/Support/CMakeLists.txt === --- llvm/include/llvm/Support/CMakeLists.txt +++ llvm/include/llvm/Support/CMakeLists.txt @@ -3,7 +3,7 @@ # The VC revision include that we want to generate. set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSRevision.h") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(LLVM_APPEND_VC_REV) set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) Index: llvm/CMakeLists.txt === --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -295,8 +295,8 @@ set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix -# Note: LLVM_CMAKE_PATH does not include generated files -set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) +# Note: LLVM_CMAKE_DIR does not include generated files +set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules) set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) Index: lldb/source/CMakeLists.txt === --- lldb/source/CMakeLists.txt +++ lldb/source/CMakeLists.txt @@ -8,7 +8,7 @@ find_first_existing_vc_file("${LLDB_SOURCE_DIR}" lldb_vc) set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(lldb_vc AND LLVM_APPEND_VC_REV) set(lldb_source_dir ${LLDB_SOURCE_DIR}) Index: lldb/cmake/modules/LLDBStandalone.cmake === --- lldb/cmake/modules/LLDBStandalone.cmake +++ lldb/cmake/modules/LLDBStandalone.cmake @@ -3,8 +3,8 @@ find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH) find_package(Clang REQUIRED CONFIG HINTS ${Clang_DIR} ${LLVM_DIR}/../clang NO_CMAKE_FIND_ROOT_PATH) -# We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when building SVNVersion.inc -set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") +# We set LLVM_CMAKE_DIR so that GetSVN.cmake is found correctly when building SVNVersion.inc +set(LLVM_CMAKE_DIR ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include") Index: lld/Common/CMakeLists.txt === --- lld/Common/CMakeLists.txt +++ lld/Common/CMakeLists.txt @@ -8,7 +8,7 @@ find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc) set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(lld_vc AND LLVM_APPEND_VC_REV) set(lld_source_dir ${LLD_SOURCE_DIR}) Index: lld/CMakeLists.txt === --- lld/CMakeLists.txt +++
[PATCH] D107717: [NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project
gAlfonso-bit updated this revision to Diff 365039. Herald added a subscriber: JDevlieghere. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107717/new/ https://reviews.llvm.org/D107717 Files: clang/CMakeLists.txt clang/lib/Basic/CMakeLists.txt compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake compiler-rt/cmake/Modules/CompilerRTUtils.cmake flang/CMakeLists.txt libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake libunwind/CMakeLists.txt lld/CMakeLists.txt lld/Common/CMakeLists.txt lldb/cmake/modules/LLDBStandalone.cmake lldb/source/CMakeLists.txt llvm/CMakeLists.txt llvm/include/llvm/Support/CMakeLists.txt runtimes/CMakeLists.txt Index: runtimes/CMakeLists.txt === --- runtimes/CMakeLists.txt +++ runtimes/CMakeLists.txt @@ -65,7 +65,7 @@ # This variable makes sure that e.g. llvm-lit is found. set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) -set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) +set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules) # This variable is used by individual runtimes to locate LLVM files. set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR}) Index: llvm/include/llvm/Support/CMakeLists.txt === --- llvm/include/llvm/Support/CMakeLists.txt +++ llvm/include/llvm/Support/CMakeLists.txt @@ -3,7 +3,7 @@ # The VC revision include that we want to generate. set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSRevision.h") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(LLVM_APPEND_VC_REV) set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) Index: llvm/CMakeLists.txt === --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -295,8 +295,8 @@ set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix -# Note: LLVM_CMAKE_PATH does not include generated files -set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) +# Note: LLVM_CMAKE_DIR does not include generated files +set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules) set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) Index: lldb/source/CMakeLists.txt === --- lldb/source/CMakeLists.txt +++ lldb/source/CMakeLists.txt @@ -8,7 +8,7 @@ find_first_existing_vc_file("${LLDB_SOURCE_DIR}" lldb_vc) set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(lldb_vc AND LLVM_APPEND_VC_REV) set(lldb_source_dir ${LLDB_SOURCE_DIR}) Index: lldb/cmake/modules/LLDBStandalone.cmake === --- lldb/cmake/modules/LLDBStandalone.cmake +++ lldb/cmake/modules/LLDBStandalone.cmake @@ -3,8 +3,8 @@ find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH) find_package(Clang REQUIRED CONFIG HINTS ${Clang_DIR} ${LLVM_DIR}/../clang NO_CMAKE_FIND_ROOT_PATH) -# We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when building SVNVersion.inc -set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") +# We set LLVM_CMAKE_DIR so that GetSVN.cmake is found correctly when building SVNVersion.inc +set(LLVM_CMAKE_DIR ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include") Index: lld/Common/CMakeLists.txt === --- lld/Common/CMakeLists.txt +++ lld/Common/CMakeLists.txt @@ -8,7 +8,7 @@ find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc) set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(lld_vc AND LLVM_APPEND_VC_REV) set(lld_source_dir ${LLD_SOURCE_DIR}) Index: lld/CMakeLists.txt === --- lld/CMakeLists.txt +++ lld/CMakeLists.txt @@ -27,7 +27,7 @@ list(GET LLVM_CONFIG_OUTPUT 0 OBJ_ROOT) list(GET LLVM_CONFIG_OUTPUT 1 MAIN_INCLUDE_DIR) - list(GET LLVM_CONFIG_OUTPUT 2 LLVM_CMAKE_PATH) + list(GET LLVM_CONFIG_OUTPUT 2 LLVM_CMAKE_DIR) list(GET LLVM_CONFIG_OUTPUT 3 MAIN_SRC_DIR) set(LLVM_OBJ_ROOT ${OBJ_ROOT} CACHE PATH "path to LLVM build tree") @@ -35,14 +35,14 @@ set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path t