Skip to content

[CMake] Support standalone builds of Clang #18460

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion core/clingutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ if (builtin_clang)
set(CLANG_RESOURCE_DIR_STEM ${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/${CMAKE_CFG_INTDIR}/lib/clang)
set(CLANG_RESOURCE_DIR_VERSION ${LLVM_VERSION_MAJOR})
else ()
set(CLANG_RESOURCE_DIR_STEM ${LLVM_LIBRARY_DIR}/clang)
# If Clang was installed standalone (in particular, not in the LLVM tree),
# use the CLANG_INSTALL_PREFIX variable to indicate where it is.
if(DEFINED CLANG_INSTALL_PREFIX)
set(CLANG_RESOURCE_DIR_STEM ${CLANG_INSTALL_PREFIX}/lib/clang)
else()
set(CLANG_RESOURCE_DIR_STEM ${LLVM_LIBRARY_DIR}/clang)
endif()
# A user can define a clang version to use, otherwise find it (but will error if more than one version is present)
if (NOT DEFINED CLANG_RESOURCE_DIR_VERSION)
if (NOT EXISTS ${CLANG_RESOURCE_DIR_STEM})
Expand Down
Loading