mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
Always compile sources with known language
Refactoring by commit11d9b211(Add cmGeneratorTarget to represent a target during generation, 2012-03-07) and commit45c2f932(Simplify cmMakefileTargetGenerator using cmGeneratorTarget, 2012-03-07) preserved behavior introduced by commit7740ccd1(some cleanup of the makefile generator, 2006-02-14) that favored the IgnoreFile extension test over the availability of a known compilation language associated with a source file. If a source is not marked as HEADER_FILE_ONLY and has a known language extension or an explicit LANGUAGE property it should be treated as that language. The LANGUAGE source file property documentation says so.
This commit is contained in:
@@ -58,6 +58,10 @@ void cmGeneratorTarget::ClassifySources()
|
||||
this->ExternalObjects.push_back(sf);
|
||||
if(isObjLib) { badObjLib.push_back(sf); }
|
||||
}
|
||||
else if(sf->GetLanguage())
|
||||
{
|
||||
this->ObjectSources.push_back(sf);
|
||||
}
|
||||
else if(ext == "def")
|
||||
{
|
||||
this->ModuleDefinitionFile = sf->GetFullPath();
|
||||
@@ -75,10 +79,6 @@ void cmGeneratorTarget::ClassifySources()
|
||||
// No message or diagnosis should be given.
|
||||
this->ExtraSources.push_back(sf);
|
||||
}
|
||||
else if(sf->GetLanguage())
|
||||
{
|
||||
this->ObjectSources.push_back(sf);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->ExtraSources.push_back(sf);
|
||||
|
||||
Reference in New Issue
Block a user