summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-07-27 20:46:06 (GMT)
committerBrad King <brad.king@kitware.com>2005-07-27 20:46:06 (GMT)
commit80802c21b64dc585a08c39ba72d7add103fafeb4 (patch)
treef979d4637a7ed89cf5f10fb3135346f4b5e2eeac /Source/cmGlobalGenerator.cxx
parent99f3b37f9c513c85063a85608c2737ee51a3eb36 (diff)
downloadCMake-80802c21b64dc585a08c39ba72d7add103fafeb4.zip
CMake-80802c21b64dc585a08c39ba72d7add103fafeb4.tar.gz
CMake-80802c21b64dc585a08c39ba72d7add103fafeb4.tar.bz2
ENH: RUN_TESTS target now uses proper CMAKE_CFG_INTDIR setting to get $(IntDir) or $(OutDir) depending on the generator.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 97e0564..0b2bc1a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1076,12 +1076,15 @@ void cmGlobalGenerator::SetupTests()
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
+ // add the RUN_TESTS 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)");
+ cmMakefile* mf = gen[0]->GetMakefile();
+ if(const char* outDir = mf->GetDefinition("CMAKE_CFG_INTDIR"))
+ {
+ mf->AddUtilityCommand("RUN_TESTS", false, no_output, no_depends,
+ ctest.c_str(), "-C", outDir);
+ }
}
}
}