diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-01 20:48:46 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-01 20:48:46 (GMT) |
commit | 86cebea79a1934bbd03f08dba884a965b7ae3b5d (patch) | |
tree | f547bb2c7fcbb981e908271db6811e45eb6015bd /Source/cmGlobalVisualStudio6Generator.cxx | |
parent | 6cd36d16e518822fd95e7d044cfe265bddf3bb07 (diff) | |
download | CMake-86cebea79a1934bbd03f08dba884a965b7ae3b5d.zip CMake-86cebea79a1934bbd03f08dba884a965b7ae3b5d.tar.gz CMake-86cebea79a1934bbd03f08dba884a965b7ae3b5d.tar.bz2 |
ENH: More ctest changes and move SetupTest to superclass
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index aec0eef..e392f55 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -371,75 +371,6 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile() } } - -inline std::string removeQuotes(const std::string& s) -{ - if(s[0] == '\"' && s[s.size()-1] == '\"') - { - return s.substr(1, s.size()-2); - } - return s; -} - - -void cmGlobalVisualStudio6Generator::SetupTests() -{ - std::string ctest = - m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"); - ctest = removeQuotes(ctest); - ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); - ctest += "/"; - ctest += "ctest"; - ctest += cmSystemTools::GetExecutableExtension(); - if(!cmSystemTools::FileExists(ctest.c_str())) - { - ctest = - m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"); - ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); - ctest += "/Debug/"; - ctest += "ctest"; - ctest += cmSystemTools::GetExecutableExtension(); - } - if(!cmSystemTools::FileExists(ctest.c_str())) - { - ctest = - m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"); - ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); - ctest += "/Release/"; - ctest += "ctest"; - ctest += cmSystemTools::GetExecutableExtension(); - } - // if we found ctest - if (cmSystemTools::FileExists(ctest.c_str())) - { - // Create a full path filename for output Testfile - std::string fname; - fname = m_CMakeInstance->GetStartOutputDirectory(); - fname += "/"; - fname += "DartTestfile.txt"; - - // If the file doesn't exist, then ENABLE_TESTING hasn't been run - if (cmSystemTools::FileExists(fname.c_str())) - { - const char* no_output = 0; - std::vector<std::string> no_depends; - std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it; - for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it) - { - std::vector<cmLocalGenerator*>& gen = it->second; - // add the ALL_BUILD to the first local generator of each project - if(gen.size()) - { - gen[0]->GetMakefile()-> - AddUtilityCommand("RUN_TESTS", false, no_output, no_depends, - ctest.c_str(), "-C", "$(IntDir)"); - } - } - } - } -} - - // Write a dsp file into the DSW file, // Note, that dependencies from executables to // the libraries it uses are also done here |