summaryrefslogtreecommitdiffstats
path: root/Source/cmBuildCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-09 17:18:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-09 17:18:15 (GMT)
commite015e103709fe12c57bd94207002eafa53733088 (patch)
treeb879f690dc22367fede57a6b39c7fdbe05a11ae9 /Source/cmBuildCommand.cxx
parent8f4f1c85078cf5b641d2d35dd185e72121bfb24d (diff)
downloadCMake-e015e103709fe12c57bd94207002eafa53733088.zip
CMake-e015e103709fe12c57bd94207002eafa53733088.tar.gz
CMake-e015e103709fe12c57bd94207002eafa53733088.tar.bz2
ENH: Pass -C flag to cmake to generate the apropriate build command
Diffstat (limited to 'Source/cmBuildCommand.cxx')
-rw-r--r--Source/cmBuildCommand.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 405b463..fd3760c 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -31,10 +31,16 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
const char* cacheValue
= this->Makefile->GetDefinition(define);
std::string makeprogram = args[1];
+ std::string configType = "Release";
+ const char* cfg = getenv("CMAKE_CONFIG_TYPE");
+ if ( cfg )
+ {
+ configType = cfg;
+ }
std::string makecommand = this->Makefile->GetLocalGenerator()
->GetGlobalGenerator()->GenerateBuildCommand
(makeprogram.c_str(), this->Makefile->GetProjectName(), 0,
- 0, "Release", true, false);
+ 0, configType.c_str(), true, false);
if(cacheValue)
{