ENH: RUN_TESTS target now uses proper CMAKE_CFG_INTDIR setting to get $(IntDir) or $(OutDir) depending on the generator.

This commit is contained in:
Brad King 2005-07-27 16:46:06 -04:00
parent 99f3b37f9c
commit 80802c21b6
1 changed files with 7 additions and 4 deletions

View File

@ -1076,12 +1076,15 @@ void cmGlobalGenerator::SetupTests()
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it) for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
{ {
std::vector<cmLocalGenerator*>& gen = it->second; 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()) if(gen.size())
{ {
gen[0]->GetMakefile()-> cmMakefile* mf = gen[0]->GetMakefile();
AddUtilityCommand("RUN_TESTS", false, no_output, no_depends, if(const char* outDir = mf->GetDefinition("CMAKE_CFG_INTDIR"))
ctest.c_str(), "-C", "$(IntDir)"); {
mf->AddUtilityCommand("RUN_TESTS", false, no_output, no_depends,
ctest.c_str(), "-C", outDir);
}
} }
} }
} }