[PATCH] D136809: [CMake] Make sure all headers are installed into `CLANG_RESOURCE_DIR`
LJC via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 11 04:01:27 PST 2022
paperchalice added inline comments.
Herald added subscribers: Michael137, JDevlieghere.
================
Comment at: clang/lib/Headers/CMakeLists.txt:285
+include(GetClangResourceDir)
+get_clang_resource_dir(output_dir PREFIX ${LLVM_BINARY_DIR}/$<CONFIG> SUBDIR include)
set(out_files)
----------------
Another choice is `${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}`, but the variable `CMAKE_CFG_INTDIR` is [[ https://cmake.org/cmake/help/latest/variable/CMAKE_CFG_INTDIR.html | deprecated ]] since 3.21
================
Comment at: cmake/Modules/GetClangResourceDir.cmake:13
+ else()
+ string(REGEX MATCH "^[0-9]+" CLANG_VERSION_MAJOR ${PACKAGE_VERSION})
+ set(ret_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR})
----------------
Can I always rely on `PACKAGE_VERSION`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136809/new/
https://reviews.llvm.org/D136809
More information about the cfe-commits
mailing list