diff options
author | Brad King <brad.king@kitware.com> | 2013-09-18 18:05:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-09-20 12:20:01 (GMT) |
commit | 027a0201b270e582d76c1de94a60c19a2a8e505c (patch) | |
tree | bbc956f874a4656452e13319f8b2ac1ab0edc498 /Source/cmTestGenerator.cxx | |
parent | 33055c405ed3b0e1df52c186f0d8a3e878aa88a8 (diff) | |
parent | 6a47c37ccf7049d5ac3fa6224def8d17ee82c7f5 (diff) | |
download | CMake-027a0201b270e582d76c1de94a60c19a2a8e505c.zip CMake-027a0201b270e582d76c1de94a60c19a2a8e505c.tar.gz CMake-027a0201b270e582d76c1de94a60c19a2a8e505c.tar.bz2 |
Merge branch 'test-property-genex' into generate-modern-style
Resolve conflict in Source/cmTestGenerator.cxx by taking "their" side
(test-property-genex). It already accounts for the lower-case change in
"our" side (generate-modern-style).
Diffstat (limited to 'Source/cmTestGenerator.cxx')
-rw-r--r-- | Source/cmTestGenerator.cxx | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 327084b..d962fb2 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -39,29 +39,8 @@ cmTestGenerator void cmTestGenerator::GenerateScriptConfigs(std::ostream& os, Indent const& indent) { - // First create the tests. + // Create the tests. this->cmScriptGenerator::GenerateScriptConfigs(os, indent); - - // Now generate the test properties. - if(this->TestGenerated) - { - cmTest* test = this->Test; - cmMakefile* mf = test->GetMakefile(); - cmLocalGenerator* lg = mf->GetLocalGenerator(); - std::ostream& fout = os; - cmPropertyMap::const_iterator pit; - cmPropertyMap* mpit = &test->GetProperties(); - if ( mpit->size() ) - { - fout << "set_tests_properties(" << test->GetName() << " PROPERTIES "; - for ( pit = mpit->begin(); pit != mpit->end(); ++ pit ) - { - fout << " " << pit->first - << " " << lg->EscapeForCMake(pit->second.GetValue()); - } - fout << ")" << std::endl; - } - } } //---------------------------------------------------------------------------- @@ -127,6 +106,22 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, // Finish the test command. os << ")\n"; + + // Output properties for the test. + cmPropertyMap& pm = this->Test->GetProperties(); + if(!pm.empty()) + { + os << indent << "set_tests_properties(" << this->Test->GetName() + << " PROPERTIES "; + for(cmPropertyMap::const_iterator i = pm.begin(); + i != pm.end(); ++i) + { + os << " " << i->first + << " " << lg->EscapeForCMake( + ge.Parse(i->second.GetValue())->Evaluate(mf, config)); + } + os << ")" << std::endl; + } } //---------------------------------------------------------------------------- @@ -181,4 +176,21 @@ void cmTestGenerator::GenerateOldStyle(std::ostream& fout, fout << "\""; } fout << ")" << std::endl; + + // Output properties for the test. + cmMakefile* mf = this->Test->GetMakefile(); + cmLocalGenerator* lg = mf->GetLocalGenerator(); + cmPropertyMap& pm = this->Test->GetProperties(); + if(!pm.empty()) + { + fout << indent << "set_tests_properties(" << this->Test->GetName() + << " PROPERTIES "; + for(cmPropertyMap::const_iterator i = pm.begin(); + i != pm.end(); ++i) + { + fout << " " << i->first + << " " << lg->EscapeForCMake(i->second.GetValue()); + } + fout << ")" << std::endl; + } } |