summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-13 20:12:06 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-18 16:30:48 (GMT)
commit123a0608dfe6cf155f0fc095cf389ae7b3d4ebb0 (patch)
treeb9f62255e7c1f8c6194e93abed2fae4875c3db58 /Source/cmGlobalVisualStudio7Generator.cxx
parent5f5c92b9a2c2f9c780c08e23231b93af71f175bd (diff)
downloadCMake-123a0608dfe6cf155f0fc095cf389ae7b3d4ebb0.zip
CMake-123a0608dfe6cf155f0fc095cf389ae7b3d4ebb0.tar.gz
CMake-123a0608dfe6cf155f0fc095cf389ae7b3d4ebb0.tar.bz2
Teach GenerateBuildCommand to find its own make program
Add a cmGlobalGenerator::SelectMakeProgram method to select a caller-provided make program, the CMAKE_MAKE_PROGRAM cache entry, or a generator-provided default. Call it from all implementations of the GenerateBuildCommand method with the corresponding generator's default, if any.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 2602f83..08eff31 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -148,7 +148,21 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
bool /*fast*/,
std::vector<std::string> const& makeOptions)
{
- makeCommand.push_back(makeProgram);
+ // Select the caller- or user-preferred make program, else devenv.
+ std::string makeProgramSelected =
+ this->SelectMakeProgram(makeProgram, this->GetDevEnvCommand());
+
+ // Ignore the above preference if it is msbuild.
+ // Assume any other value is either a devenv or
+ // command-line compatible with devenv.
+ std::string makeProgramLower = makeProgramSelected;
+ cmSystemTools::LowerCase(makeProgramLower);
+ if(makeProgramLower.find("msbuild") != std::string::npos)
+ {
+ makeProgramSelected = this->GetDevEnvCommand();
+ }
+
+ makeCommand.push_back(makeProgramSelected);
makeCommand.push_back(std::string(projectName) + ".sln");
bool clean = false;