diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-02-28 20:31:43 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-02-28 20:31:43 (GMT) |
commit | 6783765c907932449bfe450918735d2405835427 (patch) | |
tree | 03704fd28e8517389bb2f5a8e047f250e5e38f22 /Source/cmGlobalGenerator.cxx | |
parent | 0f36f0ef9096a7d24ce282cd820556fd4fd22e18 (diff) | |
download | CMake-6783765c907932449bfe450918735d2405835427.zip CMake-6783765c907932449bfe450918735d2405835427.tar.gz CMake-6783765c907932449bfe450918735d2405835427.tar.bz2 |
BUG: On Visual Studio and XCode, handle build configurations
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index bc99f12..506e80d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1213,6 +1213,8 @@ void cmGlobalGenerator::SetupTests() void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) { cmMakefile* mf = m_LocalGenerators[0]->GetMakefile(); + const char* cmakeCfgIntDir = this->GetCMakeCFGInitDirectory(); + // CPack cmCustomCommandLines cpackCommandLines; std::vector<std::string> depends; @@ -1220,6 +1222,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); + if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[1] != '.' ) + { + singleLine.push_back("-C"); + singleLine.push_back(mf->GetDefinition("CMAKE_CFG_INTDIR")); + } singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand()); singleLine.push_back("--config"); std::string configFile = mf->GetStartOutputDirectory();; @@ -1314,7 +1321,6 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cmd = cmakeCommand; } singleLine.push_back(cmd.c_str()); - const char* cmakeCfgIntDir = this->GetCMakeCFGInitDirectory(); if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[1] != '.' ) { std::string cfgArg = "-DBUILD_TYPE="; |