summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-02 15:20:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-02 15:20:46 (GMT)
commite95d274f3031180103ee8c88f51432c8d93a5a02 (patch)
treebc4e03e2b8d0a2004bf3ef8f9e9feea0fc002e71 /Source/cmLocalGenerator.cxx
parent525bd2d5e6b6fef64f7eeee0df331e19f94d9298 (diff)
parentaba23c747b4a7fb342ae77d67b8b5cfbe9a67c8c (diff)
downloadCMake-e95d274f3031180103ee8c88f51432c8d93a5a02.zip
CMake-e95d274f3031180103ee8c88f51432c8d93a5a02.tar.gz
CMake-e95d274f3031180103ee8c88f51432c8d93a5a02.tar.bz2
Merge topic 'cmprop-makefile'
aba23c747b cmMakefile::GetProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4559
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 55f61ea..a80bc7c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -301,16 +301,14 @@ void cmLocalGenerator::GenerateTestFiles()
"# testing this directory and lists subdirectories to "
"be tested as well.\n";
- const char* testIncludeFile =
- this->Makefile->GetProperty("TEST_INCLUDE_FILE");
+ cmProp testIncludeFile = this->Makefile->GetProperty("TEST_INCLUDE_FILE");
if (testIncludeFile) {
- fout << "include(\"" << testIncludeFile << "\")\n";
+ fout << "include(\"" << *testIncludeFile << "\")\n";
}
- const char* testIncludeFiles =
- this->Makefile->GetProperty("TEST_INCLUDE_FILES");
+ cmProp testIncludeFiles = this->Makefile->GetProperty("TEST_INCLUDE_FILES");
if (testIncludeFiles) {
- std::vector<std::string> includesList = cmExpandedList(testIncludeFiles);
+ std::vector<std::string> includesList = cmExpandedList(*testIncludeFiles);
for (std::string const& i : includesList) {
fout << "include(\"" << i << "\")\n";
}
@@ -335,12 +333,12 @@ void cmLocalGenerator::GenerateTestFiles()
// Add directory labels property
const char* directoryLabels =
this->Makefile->GetDefinition("CMAKE_DIRECTORY_LABELS");
- const char* labels = this->Makefile->GetProperty("LABELS");
+ cmProp labels = this->Makefile->GetProperty("LABELS");
if (labels || directoryLabels) {
fout << "set_directory_properties(PROPERTIES LABELS ";
if (labels) {
- fout << cmOutputConverter::EscapeForCMake(labels);
+ fout << cmOutputConverter::EscapeForCMake(*labels);
}
if (labels && directoryLabels) {
fout << ";";
@@ -775,7 +773,8 @@ const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target,
if (target) {
return target->GetProperty(prop);
}
- return this->Makefile->GetProperty(prop);
+ cmProp p = this->Makefile->GetProperty(prop);
+ return p ? p->c_str() : nullptr;
}
std::string cmLocalGenerator::ConvertToIncludeReference(