diff options
author | Brad King <brad.king@kitware.com> | 2020-07-21 17:22:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-23 17:31:45 (GMT) |
commit | 2f0790df5046bfc99383317eb7d24cd4030200be (patch) | |
tree | 60362de080828e4b1b4fcd849b2d3e07ac157a42 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 422d9a0ab21ff430e5fd012cf965dd92068d185f (diff) | |
download | CMake-2f0790df5046bfc99383317eb7d24cd4030200be.zip CMake-2f0790df5046bfc99383317eb7d24cd4030200be.tar.gz CMake-2f0790df5046bfc99383317eb7d24cd4030200be.tar.bz2 |
Factor out generator checks for filtering on non-compiling targets
Add a `cmGeneratorTarget::CanCompileSources` helper method to tell
generators whether a target might compile anything.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 08f0a5f..23e2a94 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -137,8 +137,7 @@ void cmLocalUnixMakefileGenerator3::GetLocalObjectFiles( std::map<std::string, LocalObjectInfo>& localObjectFiles) { for (const auto& gt : this->GetGeneratorTargets()) { - if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY || - gt->GetType() == cmStateEnums::UTILITY) { + if (!gt->CanCompileSources()) { continue; } std::vector<cmSourceFile const*> objectSources; |