diff options
author | Ken Martin <ken.martin@kitware.com> | 2004-09-07 15:28:49 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2004-09-07 15:28:49 (GMT) |
commit | 3eae8f44059646241482133d98adb32631ab9c14 (patch) | |
tree | cc725b68430cd740e73dfb07e515650ddc44a886 /Source/CTest/cmCTestScriptHandler.cxx | |
parent | 0a184c3d616c648d0bfcf546f4f5881538df6505 (diff) | |
download | CMake-3eae8f44059646241482133d98adb32631ab9c14.zip CMake-3eae8f44059646241482133d98adb32631ab9c14.tar.gz CMake-3eae8f44059646241482133d98adb32631ab9c14.tar.bz2 |
more warnings
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 2d35f97..a51bd4b 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -175,30 +175,13 @@ int cmCTestScriptHandler::ExtractVariables() // get some info that should be set m_Makefile = m_LocalGenerator->GetMakefile(); - m_SourceDir.clear(); - m_BinaryDir.clear(); - m_CTestCmd.clear(); - - if (m_Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")) - { - m_SourceDir = m_Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY"); - } - if (m_Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")) - { - m_BinaryDir = m_Makefile->GetDefinition("CTEST_BINARY_DIRECTORY"); - } - if (m_Makefile->GetDefinition("CTEST_COMMAND")) - { - m_CTestCmd = m_Makefile->GetDefinition("CTEST_COMMAND"); - } + m_SourceDir = m_Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY"); + m_BinaryDir = m_Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY"); + m_CTestCmd = m_Makefile->GetSafeDefinition("CTEST_COMMAND"); m_Backup = m_Makefile->IsOn("CTEST_BACKUP_AND_RESTORE"); // in order to backup and restore we also must have the cvs root - m_CVSCheckOut.clear(); - if (m_Makefile->GetDefinition("CTEST_CVS_CHECKOUT")) - { - m_CVSCheckOut = m_Makefile->GetDefinition("CTEST_CVS_CHECKOUT"); - } + m_CVSCheckOut = m_Makefile->GetSafeDefinition("CTEST_CVS_CHECKOUT"); if (m_Backup && m_CVSCheckOut.empty()) { cmSystemTools::Error( @@ -241,11 +224,7 @@ int cmCTestScriptHandler::ExtractVariables() atof(m_Makefile->GetDefinition("CTEST_CONTINUOUS_MINIMUM_INTERVAL")); } - m_CVSCmd.clear(); - if (m_Makefile->GetDefinition("CTEST_CVS_COMMAND")) - { - m_CVSCmd = m_Makefile->GetDefinition("CTEST_CVS_COMMAND"); - } + m_CVSCmd = m_Makefile->GetSafeDefinition("CTEST_CVS_COMMAND"); return 0; } |