summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-10-13 21:10:48 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-10-13 21:10:48 (GMT)
commit3206db15b37c29a4f9d7edd5695db52a885ef3f4 (patch)
treee753fd2673e2d05e518ac7ed9036ab00b94f84e9 /Source/cmCTest.cxx
parent655ba54e2d74f50441829001995a4e1ce1a1ae88 (diff)
downloadCMake-3206db15b37c29a4f9d7edd5695db52a885ef3f4.zip
CMake-3206db15b37c29a4f9d7edd5695db52a885ef3f4.tar.gz
CMake-3206db15b37c29a4f9d7edd5695db52a885ef3f4.tar.bz2
ENH: Properly propagate config type to test
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index d7fcaa5..ba20dfc 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1546,14 +1546,7 @@ void cmCTest::HandleCommandLineArguments(size_t &i,
i < args.size() - 1)
{
i++;
- this->ConfigType = args[i];
- cmSystemTools::ReplaceString(this->ConfigType, ".\\", "");
- if ( !this->ConfigType.empty() )
- {
- std::string confTypeEnv
- = "CMAKE_CONFIG_TYPE=" + this->ConfigType;
- cmSystemTools::PutEnv(confTypeEnv.c_str());
- }
+ this->SetConfigType(args[i].c_str());
}
if(this->CheckArgument(arg, "--debug"))
@@ -1848,7 +1841,7 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
#ifdef CMAKE_INTDIR
if(this->ConfigType.size() == 0)
{
- this->ConfigType = CMAKE_INTDIR;
+ this->SetConfigType(CMAKE_INTDIR);
}
#endif
@@ -2293,6 +2286,16 @@ void cmCTest::AddCTestConfigurationOverwrite(const char* encstr)
}
//----------------------------------------------------------------------
+void cmCTest::SetConfigType(const char* ct)
+{
+ this->ConfigType = ct?ct:"";
+ cmSystemTools::ReplaceString(this->ConfigType, ".\\", "");
+ std::string confTypeEnv
+ = "CMAKE_CONFIG_TYPE=" + this->ConfigType;
+ cmSystemTools::PutEnv(confTypeEnv.c_str());
+}
+
+//----------------------------------------------------------------------
bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
const char* dconfig, const char* cmake_var)
{