Skip to content

Commit 50d001c

Browse files
committed
cmake: Make sure to get the resource directory from the right clang compiler
The resource directory was always retrieved from the system's default clang compiler instead of the targeted one.
1 parent 4331c89 commit 50d001c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ endif()
132132
# Find Clang resource directory with Clang executable.
133133

134134
if(NOT CLANG_RESOURCE_DIR)
135-
find_program(CLANG_EXECUTABLE clang)
135+
find_program(CLANG_EXECUTABLE clang-${Clang_VERSION_MAJOR})
136136
if(NOT CLANG_EXECUTABLE)
137-
message(FATAL_ERROR "clang executable not found.")
137+
message(FATAL_ERROR "clang-${Clang_VERSION_MAJOR} executable not found.")
138138
endif()
139139

140140
execute_process(

0 commit comments

Comments
 (0)