diff options
author | Brad King <brad.king@kitware.com> | 2013-11-13 20:12:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-18 16:30:48 (GMT) |
commit | 123a0608dfe6cf155f0fc095cf389ae7b3d4ebb0 (patch) | |
tree | b9f62255e7c1f8c6194e93abed2fae4875c3db58 /Source/cmGlobalVisualStudio6Generator.cxx | |
parent | 5f5c92b9a2c2f9c780c08e23231b93af71f175bd (diff) | |
download | CMake-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/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 51f38c2..08ea249 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -118,24 +118,9 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand( ) { // now build the test - std::vector<std::string> mp; - mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio" - "\\6.0\\Setup;VsCommonDir]/MSDev98/Bin"); - cmSystemTools::ExpandRegistryValues(mp[0]); - std::string originalCommand = makeProgram; - std::string makeCommandFound = - cmSystemTools::FindProgram(makeProgram, mp); - if(makeCommandFound.size() == 0) - { - std::string e = "Generator cannot find Visual Studio 6 msdev program \""; - e += originalCommand; - e += "\" specified by CMAKE_MAKE_PROGRAM cache entry. "; - e += "Please fix the setting."; - cmSystemTools::Error(e.c_str()); - return; - } - - makeCommand.push_back(makeCommandFound); + makeCommand.push_back( + this->SelectMakeProgram(makeProgram, this->GetMSDevCommand()) + ); makeCommand.push_back(std::string(projectName)+".dsw"); makeCommand.push_back("/MAKE"); |