BUG: CMake 1.4 configured projects did not build with new CMake.
This commit is contained in:
parent
259a49aaac
commit
15e38175a4
@ -73,10 +73,18 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
|
|||||||
// now build the test
|
// now build the test
|
||||||
std::string makeCommand =
|
std::string makeCommand =
|
||||||
m_CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM");
|
m_CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM");
|
||||||
|
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 = makeCommand;
|
||||||
|
makeCommand = cmSystemTools::FindProgram(makeCommand.c_str(), mp);
|
||||||
if(makeCommand.size() == 0)
|
if(makeCommand.size() == 0)
|
||||||
{
|
{
|
||||||
cmSystemTools::Error(
|
std::string e = "Generator cannot find make program \"";
|
||||||
"Generator cannot find the appropriate make command.");
|
e += originalCommand;
|
||||||
|
e += "\" specified by CMAKE_MAKE_PROGRAM cache entry. ";
|
||||||
|
e += "Please fix the setting.";
|
||||||
|
cmSystemTools::Error(e.c_str());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
makeCommand = cmSystemTools::ConvertToOutputPath(makeCommand.c_str());
|
makeCommand = cmSystemTools::ConvertToOutputPath(makeCommand.c_str());
|
||||||
@ -112,7 +120,13 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
|
|||||||
int retVal;
|
int retVal;
|
||||||
if (!cmSystemTools::RunCommand(makeCommand.c_str(), *output, retVal, 0, false))
|
if (!cmSystemTools::RunCommand(makeCommand.c_str(), *output, retVal, 0, false))
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("Generator: execution of msdev failed.");
|
std::string e = "Error executing make program \"";
|
||||||
|
e += originalCommand;
|
||||||
|
e += "\" specified by CMAKE_MAKE_PROGRAM cache entry. ";
|
||||||
|
e += "The command string used was \"";
|
||||||
|
e += makeCommand.c_str();
|
||||||
|
e += "\".";
|
||||||
|
cmSystemTools::Error(e.c_str());
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user