mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -06:00
GNU: Disable depfiles in try-compile mode only for GCC
Disabling them causes issues for Clang's CUDA frontend. Since this is a GCC bug, simply check for GCC.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user