summaryrefslogtreecommitdiffstats
path: root/Source/cmStateSnapshot.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-13 17:30:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-13 17:32:17 (GMT)
commit60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14 (patch)
tree575fad8fdaf9dd42c0d88785a5aa6b361406fe80 /Source/cmStateSnapshot.cxx
parent3766633b8a49cb24f4849721bb22a0feb9ba1f60 (diff)
downloadCMake-60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14.zip
CMake-60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14.tar.gz
CMake-60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14.tar.bz2
cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Currently properties are usually stored internally as `std::string`. However, family of GetProperty() functions return them as `const char *` using `c_str()`. The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties more naturally.
Diffstat (limited to 'Source/cmStateSnapshot.cxx')
-rw-r--r--Source/cmStateSnapshot.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index 832e74e..d79df6f 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -411,11 +411,12 @@ void cmStateSnapshot::InitializeFromParent()
this->Position->BuildSystemDirectory->LinkDirectoriesBacktraces,
this->Position->LinkDirectoriesPosition);
- const char* include_regex =
+ cmProp include_regex =
parent->BuildSystemDirectory->Properties.GetPropertyValue(
"INCLUDE_REGULAR_EXPRESSION");
this->Position->BuildSystemDirectory->Properties.SetProperty(
- "INCLUDE_REGULAR_EXPRESSION", include_regex);
+ "INCLUDE_REGULAR_EXPRESSION",
+ include_regex ? include_regex->c_str() : nullptr);
}
cmState* cmStateSnapshot::GetState() const