Skip to content

Commit

Permalink
cmake: Make sure to get the resource directory from the right clang c…
Browse files Browse the repository at this point in the history
…ompiler

The resource directory was always retrieved from the system's default clang
compiler instead of the targeted one.
  • Loading branch information
rherilier committed Nov 29, 2024
1 parent 4331c89 commit 50d001c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ endif()
# Find Clang resource directory with Clang executable.

if(NOT CLANG_RESOURCE_DIR)
find_program(CLANG_EXECUTABLE clang)
find_program(CLANG_EXECUTABLE clang-${Clang_VERSION_MAJOR})
if(NOT CLANG_EXECUTABLE)
message(FATAL_ERROR "clang executable not found.")
message(FATAL_ERROR "clang-${Clang_VERSION_MAJOR} executable not found.")
endif()

execute_process(
Expand Down

0 comments on commit 50d001c

Please sign in to comment.