summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-03 16:51:53 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-03 16:51:53 (GMT)
commit5376151aa1d724b6d7ddef8d2e521d97cbfa74ae (patch)
tree88ceb52c0ff365ceb53ea408f45fe729cfbd7f3c /Source/cmLocalVisualStudio6Generator.cxx
parent93054aa84f283de17c58fa2ee19a2a4a1668027d (diff)
parent9407174b1a0f1b4f8edf7fe08cc85ab6e990d59f (diff)
downloadCMake-5376151aa1d724b6d7ddef8d2e521d97cbfa74ae.zip
CMake-5376151aa1d724b6d7ddef8d2e521d97cbfa74ae.tar.gz
CMake-5376151aa1d724b6d7ddef8d2e521d97cbfa74ae.tar.bz2
Merge topic 'target-transitive-sources'
9407174b target_sources: New command to add sources to target. 81ad69e0 Make the SOURCES target property writable. 6e636f2e cmTarget: Make the SOURCES origin tracable. 3676fb49 cmTarget: Allow transitive evaluation of SOURCES property. e6971df6 cmTarget: Make the source files depend on the config. df753df9 cmGeneratorTarget: Don't add computed sources to the target. 869328aa cmComputeTargetDepends: Use valid config to compute target depends.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx37
1 files changed, 33 insertions, 4 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 11e9679..5db735f 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -317,7 +317,10 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
// get the classes from the source lists then add them to the groups
std::vector<cmSourceFile*> classes;
- target.GetSourceFiles(classes);
+ if (!target.GetConfigCommonSourceFiles(classes))
+ {
+ return;
+ }
// now all of the source files have been properly assigned to the target
// now stick them into source groups using the reg expressions
@@ -1269,7 +1272,20 @@ void cmLocalVisualStudio6Generator
if(targetBuilds)
{
// Get the language to use for linking.
- const std::string& linkLanguage = target.GetLinkerLanguage();
+ std::vector<std::string> configs;
+ target.GetMakefile()->GetConfigurations(configs);
+ std::vector<std::string>::const_iterator it = configs.begin();
+ const std::string& linkLanguage = target.GetLinkerLanguage(*it);
+ for ( ; it != configs.end(); ++it)
+ {
+ const std::string& configLinkLanguage = target.GetLinkerLanguage(*it);
+ if (configLinkLanguage != linkLanguage)
+ {
+ cmSystemTools::Error
+ ("Linker language must not vary by configuration for target: ",
+ target.GetName().c_str());
+ }
+ }
if(linkLanguage.empty())
{
cmSystemTools::Error
@@ -1691,7 +1707,20 @@ void cmLocalVisualStudio6Generator
if(target.GetType() >= cmTarget::EXECUTABLE &&
target.GetType() <= cmTarget::OBJECT_LIBRARY)
{
- const std::string& linkLanguage = target.GetLinkerLanguage();
+ std::vector<std::string> configs;
+ target.GetMakefile()->GetConfigurations(configs);
+ std::vector<std::string>::const_iterator it = configs.begin();
+ const std::string& linkLanguage = target.GetLinkerLanguage(*it);
+ for ( ; it != configs.end(); ++it)
+ {
+ const std::string& configLinkLanguage = target.GetLinkerLanguage(*it);
+ if (configLinkLanguage != linkLanguage)
+ {
+ cmSystemTools::Error
+ ("Linker language must not vary by configuration for target: ",
+ target.GetName().c_str());
+ }
+ }
if(linkLanguage.empty())
{
cmSystemTools::Error
@@ -1889,7 +1918,7 @@ void cmLocalVisualStudio6Generator
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&target);
std::vector<std::string> objs;
- gt->UseObjectLibraries(objs);
+ gt->UseObjectLibraries(objs, "");
for(std::vector<std::string>::const_iterator
oi = objs.begin(); oi != objs.end(); ++oi)
{