BUG: executable extension wrong for ctest search, and was not looking in Debug and Release

This commit is contained in:
Bill Hoffman 2001-12-07 19:11:28 -05:00
parent b0f3a17450
commit 29ef645272
1 changed files with 17 additions and 1 deletions

View File

@ -1529,7 +1529,23 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/";
ctest += "ctest";
ctest += m_ExecutableExtension;
ctest += cmSystemTools::GetExecutableExtension();
if(!cmSystemTools::FileExists(ctest.c_str()))
{
ctest = m_Makefile->GetDefinition("CMAKE_COMMAND");
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/Debug/";
ctest += "ctest";
ctest += cmSystemTools::GetExecutableExtension();
}
if(!cmSystemTools::FileExists(ctest.c_str()))
{
ctest = m_Makefile->GetDefinition("CMAKE_COMMAND");
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/Release/";
ctest += "ctest";
ctest += cmSystemTools::GetExecutableExtension();
}
if (cmSystemTools::FileExists(ctest.c_str()))
{
this->OutputMakeRule(fout,