diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-21 15:12:35 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-21 15:14:04 (GMT) |
commit | cc56dc7468bfee49dedbf395d6fca5c372d200fe (patch) | |
tree | c4463a4dcdada55ca57cba3713fea88d8d2f3f57 /Source/cmSourceFile.cxx | |
parent | 62834c07603e82aafabc082bbbcf74179a4cda27 (diff) | |
download | CMake-cc56dc7468bfee49dedbf395d6fca5c372d200fe.zip CMake-cc56dc7468bfee49dedbf395d6fca5c372d200fe.tar.gz CMake-cc56dc7468bfee49dedbf395d6fca5c372d200fe.tar.bz2 |
Rename cmProp in cmValue
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 6caae3a..3fa0051 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -13,6 +13,7 @@ #include "cmState.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" +#include "cmValue.h" #include "cmake.h" cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name, @@ -53,7 +54,7 @@ std::string cmSourceFile::GetObjectLibrary() const std::string const& cmSourceFile::GetOrDetermineLanguage() { // If the language was set explicitly by the user then use it. - if (cmProp lang = this->GetProperty(propLANGUAGE)) { + if (cmValue lang = this->GetProperty(propLANGUAGE)) { // Assign to member in order to return a reference. this->Language = *lang; return this->Language; @@ -84,7 +85,7 @@ std::string const& cmSourceFile::GetOrDetermineLanguage() std::string cmSourceFile::GetLanguage() const { // If the language was set explicitly by the user then use it. - if (cmProp lang = this->GetProperty(propLANGUAGE)) { + if (cmValue lang = this->GetProperty(propLANGUAGE)) { return *lang; } @@ -299,7 +300,7 @@ void cmSourceFile::SetProperty(const std::string& prop, const char* value) { this->StoreProperty(prop, value); } -void cmSourceFile::SetProperty(const std::string& prop, cmProp value) +void cmSourceFile::SetProperty(const std::string& prop, cmValue value) { this->StoreProperty(prop, value); } @@ -327,7 +328,7 @@ void cmSourceFile::AppendProperty(const std::string& prop, } } -cmProp cmSourceFile::GetPropertyForUser(const std::string& prop) +cmValue cmSourceFile::GetPropertyForUser(const std::string& prop) { // This method is a consequence of design history and backwards // compatibility. GetProperty is (and should be) a const method. @@ -352,7 +353,7 @@ cmProp cmSourceFile::GetPropertyForUser(const std::string& prop) // if it is requested by the user. if (prop == propLANGUAGE) { // The pointer is valid until `this->Language` is modified. - return cmProp(this->GetOrDetermineLanguage()); + return cmValue(this->GetOrDetermineLanguage()); } // Special handling for GENERATED property. @@ -365,23 +366,23 @@ cmProp cmSourceFile::GetPropertyForUser(const std::string& prop) (policyStatus == cmPolicies::WARN || policyStatus == cmPolicies::OLD) ? CheckScope::GlobalAndLocal : CheckScope::Global)) { - return cmProp(propTRUE); + return cmValue(propTRUE); } - return cmProp(propFALSE); + return cmValue(propFALSE); } // Perform the normal property lookup. return this->GetProperty(prop); } -cmProp cmSourceFile::GetProperty(const std::string& prop) const +cmValue cmSourceFile::GetProperty(const std::string& prop) const { // Check for computed properties. if (prop == propLOCATION) { if (this->FullPath.empty()) { return nullptr; } - return cmProp(this->FullPath); + return cmValue(this->FullPath); } // Check for the properties with backtraces. @@ -392,7 +393,7 @@ cmProp cmSourceFile::GetProperty(const std::string& prop) const static std::string output; output = cmJoin(this->IncludeDirectories, ";"); - return cmProp(output); + return cmValue(output); } if (prop == propCOMPILE_OPTIONS) { @@ -402,7 +403,7 @@ cmProp cmSourceFile::GetProperty(const std::string& prop) const static std::string output; output = cmJoin(this->CompileOptions, ";"); - return cmProp(output); + return cmValue(output); } if (prop == propCOMPILE_DEFINITIONS) { @@ -412,10 +413,10 @@ cmProp cmSourceFile::GetProperty(const std::string& prop) const static std::string output; output = cmJoin(this->CompileDefinitions, ";"); - return cmProp(output); + return cmValue(output); } - cmProp retVal = this->Properties.GetPropertyValue(prop); + cmValue retVal = this->Properties.GetPropertyValue(prop); if (!retVal) { cmMakefile const* mf = this->Location.GetMakefile(); const bool chain = @@ -431,7 +432,7 @@ cmProp cmSourceFile::GetProperty(const std::string& prop) const const std::string& cmSourceFile::GetSafeProperty(const std::string& prop) const { - cmProp ret = this->GetProperty(prop); + cmValue ret = this->GetProperty(prop); if (ret) { return *ret; } |