|
|
@@ -53,7 +53,7 @@ macro(__compiler_gnu lang)
|
|
|
endif()
|
|
|
|
|
|
# define flags for linker depfile generation
|
|
|
- if (NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
|
|
|
+ if(NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
|
|
|
## Ensure ninja tool is recent enough...
|
|
|
if(CMAKE_GENERATOR MATCHES "^Ninja")
|
|
|
# Ninja 1.10 or upper is required
|
|
|
@@ -71,7 +71,7 @@ macro(__compiler_gnu lang)
|
|
|
|
|
|
if (NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
|
|
|
## check if this feature is supported by the linker
|
|
|
- execute_process(COMMAND "${CMAKE_LINKER}" --help
|
|
|
+ execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" -Wl,--help
|
|
|
OUTPUT_VARIABLE _linker_capabilities
|
|
|
ERROR_VARIABLE _linker_capabilities)
|
|
|
if(_linker_capabilities MATCHES "--dependency-file")
|
|
|
@@ -82,6 +82,7 @@ macro(__compiler_gnu lang)
|
|
|
unset(_linker_capabilities)
|
|
|
endif()
|
|
|
endif()
|
|
|
+
|
|
|
if (CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
|
|
|
set(CMAKE_${lang}_LINKER_DEPFILE_FLAGS "LINKER:--dependency-file,<DEP_FILE>")
|
|
|
set(CMAKE_${lang}_LINKER_DEPFILE_FORMAT gcc)
|