diff options
author | Robert Goulet <robert.goulet@autodesk.com> | 2015-05-01 17:46:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-06 14:31:39 (GMT) |
commit | a6e4e73da3de092439b6fcfe884f44a7c8a1ad81 (patch) | |
tree | cbffd7b03e181ad6f6f69d09365f435302b26280 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 562e69dd500f3b1558ab3ffd62679b8b4b0df842 (diff) | |
download | CMake-a6e4e73da3de092439b6fcfe884f44a7c8a1ad81.zip CMake-a6e4e73da3de092439b6fcfe884f44a7c8a1ad81.tar.gz CMake-a6e4e73da3de092439b6fcfe884f44a7c8a1ad81.tar.bz2 |
VS: Add option to put INSTALL target in .sln default build
Add a CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD variable to control
this behavior.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index de90f7e..ead5ddc 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -1031,6 +1031,24 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( int type = target->GetType(); if (type == cmTarget::GLOBAL_TARGET) { + // check if INSTALL target is part of default build + if(target->GetName() == "INSTALL") + { + // inspect CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD properties + for(std::vector<std::string>::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + const char* propertyValue = target->GetMakefile() + ->GetDefinition("CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD"); + cmGeneratorExpression ge; + cmsys::auto_ptr<cmCompiledGeneratorExpression> + cge = ge.Parse(propertyValue); + if(cmSystemTools::IsOn(cge->Evaluate(target->GetMakefile(), *i))) + { + activeConfigs.insert(*i); + } + } + } return activeConfigs; } if(type == cmTarget::UTILITY && !this->IsDependedOn(projectTargets, target)) |