diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 3 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 26 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.h | 2 |
3 files changed, 30 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 8227b82..f6796a5 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -94,7 +94,8 @@ void cmGlobalVisualStudio71Generator TargetDependSet projectTargets; TargetDependSet originalTargets; this->GetTargetSets(projectTargets, originalTargets, root, generators); - OrderedTargetDependSet orderedProjectTargets(projectTargets, "ALL_BUILD"); + OrderedTargetDependSet orderedProjectTargets( + projectTargets, this->GetStartupProjectName(root)); this->WriteTargetsToSolution(fout, root, orderedProjectTargets); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 00bb511..b11b49a 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -519,6 +519,32 @@ cmGlobalVisualStudioGenerator::GetUtilityDepend( } //---------------------------------------------------------------------------- +std::string +cmGlobalVisualStudioGenerator::GetStartupProjectName( + cmLocalGenerator const* root) const +{ + const char* n = root->GetMakefile()->GetProperty("VS_STARTUP_PROJECT"); + if (n && *n) + { + std::string startup = n; + if (this->FindTarget(startup)) + { + return startup; + } + else + { + root->GetMakefile()->IssueMessage( + cmake::AUTHOR_WARNING, + "Directory property VS_STARTUP_PROJECT specifies target " + "'" + startup + "' that does not exist. Ignoring."); + } + } + + // default, if not specified + return this->GetAllTargetName(); +} + +//---------------------------------------------------------------------------- #include <windows.h> //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index ac9111e..723a75f 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -106,6 +106,8 @@ public: void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; + std::string GetStartupProjectName(cmLocalGenerator const* root) const; + void AddSymbolExportCommand( cmGeneratorTarget*, std::vector<cmCustomCommand>& commands, std::string const& configName); |