diff options
Diffstat (limited to 'Source/cmDSWWriter.cxx')
-rw-r--r-- | Source/cmDSWWriter.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmDSWWriter.cxx b/Source/cmDSWWriter.cxx index 35a1210..36abbc5 100644 --- a/Source/cmDSWWriter.cxx +++ b/Source/cmDSWWriter.cxx @@ -80,6 +80,29 @@ void cmDSWWriter::WriteDSWFile(std::ostream& fout) // of Debug only m_Makefile->AddUtilityCommand("ALL_BUILD", "echo", "\"Build all projects\"", false); + std::string ctest = m_Makefile->GetDefinition("CMAKE_COMMAND"); + ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); + ctest += "/"; + ctest += "ctest"; + 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(); + } + m_Makefile->AddUtilityCommand("RUN_TESTS", ctest.c_str(), "-D $(IntDir)", + false); m_Makefile->FindSubDirectoryCMakeListsFiles(allListFiles); // For each cmMakefile, create a DSP for it, and // add it to this DSW file |