cmTarget: Make the source files depend on the config.

Disallow the use of config-specific source files with
the Visual Studio and Xcode generators. They don't have
any way to represent the condition currently.

Use the same common-config API in cmQtAutoGenerators. While
it accepts config-specific files, it doesn't have to support
multiple configurations yet.

Loop over the configs in cmTargetTraceDependencies
and cmGlobalGenerator::WriteSummary and consume all source
files.

Loop over the configs in cmComputeTargetDepends and compute the
object library dependencies for each config.
This commit is contained in:
Stephen Kelly
2014-02-13 17:25:00 +01:00
parent df753df94b
commit e6971df6ab
44 changed files with 492 additions and 138 deletions

View File

@@ -1330,7 +1330,7 @@ cmLocalVisualStudio7GeneratorInternals
cmGeneratorTarget* gt =
lg->GetGlobalGenerator()->GetGeneratorTarget(t);
std::vector<std::string> objs;
gt->UseObjectLibraries(objs);
gt->UseObjectLibraries(objs, "");
const char* sep = isep? isep : "";
for(std::vector<std::string>::const_iterator
oi = objs.begin(); oi != objs.end(); ++oi)
@@ -1397,7 +1397,10 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
// get the classes from the source lists then add them to the groups
this->ModuleDefinitionFile = "";
std::vector<cmSourceFile*> classes;
target.GetSourceFiles(classes);
if (!target.GetConfigCommonSourceFiles(classes))
{
return;
}
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); i++)
{
@@ -1438,7 +1441,7 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&target);
std::vector<std::string> objs;
gt->UseObjectLibraries(objs);
gt->UseObjectLibraries(objs, "");
if(!objs.empty())
{
// TODO: Separate sub-filter for each object library used?