Browse Source

Merge topic 'clang-use-arg1'

7008fc234b CMakeDetermineCompilerId: use `_ARG1` to query the clang resource dir

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9285
Brad King 1 year ago
parent
commit
1fc670fb22
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Modules/CMakeDetermineCompilerId.cmake

+ 3 - 1
Modules/CMakeDetermineCompilerId.cmake

@@ -296,7 +296,9 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
       "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xClang" AND
       "x${CMAKE_${lang}_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
     execute_process(
-      COMMAND "${CMAKE_${lang}_COMPILER}" -print-resource-dir
+      COMMAND "${CMAKE_${lang}_COMPILER}"
+        ${CMAKE_${lang}_COMPILER_ID_ARG1}
+        -print-resource-dir
       OUTPUT_VARIABLE _clang_resource_dir_out
       ERROR_VARIABLE _clang_resource_dir_err
       RESULT_VARIABLE _clang_resource_dir_res