Browse Source

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

Other core queries do this, so do it here too.
Ben Boeckel 1 year ago
parent
commit
7008fc234b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Modules/CMakeDetermineCompilerId.cmake

+ 3 - 1
Modules/CMakeDetermineCompilerId.cmake

@@ -292,7 +292,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