diff --git a/CMakeLists.txt b/CMakeLists.txt index af9bcc1a3..1de2e1e6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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(