diff options
Diffstat (limited to 'Modules/Compiler/GNU.cmake')
-rw-r--r-- | Modules/Compiler/GNU.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 3357a86..df6d6b8 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -44,7 +44,8 @@ macro(__compiler_gnu lang) # tests to always succeed. Work around this by disabling dependency tracking # in try_compile mode. get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE) - if(NOT _IN_TC OR CMAKE_FORCE_DEPFILES) + if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" AND _IN_TC AND NOT CMAKE_FORCE_DEPFILES) + else() # distcc does not transform -o to -MT when invoking the preprocessor # internally, as it ought to. Work around this bug by setting -MT here # even though it isn't strictly necessary. |