diff options
Diffstat (limited to 'Source/cmSetPropertyCommand.cxx')
-rw-r--r-- | Source/cmSetPropertyCommand.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index c899053..db10cd4 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -21,6 +21,7 @@ #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTest.h" +#include "cmValue.h" #include "cmake.h" namespace { @@ -116,7 +117,7 @@ bool HandleSourceFileDirectoryScopes( "given non-existent target for TARGET_DIRECTORY ", target_name)); return false; } - cmProp target_source_dir = target->GetProperty("BINARY_DIR"); + cmValue target_source_dir = target->GetProperty("BINARY_DIR"); cmMakefile* target_dir_mf = status.GetMakefile().GetGlobalGenerator()->FindMakefile( *target_source_dir); @@ -294,7 +295,7 @@ bool HandleAndValidateSourceFilePropertyGENERATED( sf->SetProperty("GENERATED", nullptr); break; case PropertyOp::Set: - sf->SetProperty("GENERATED", propertyValue.c_str()); + sf->SetProperty("GENERATED", propertyValue); break; } } else { @@ -474,7 +475,7 @@ bool HandleGlobalMode(cmExecutionStatus& status, if (remove) { cm->SetProperty(propertyName, nullptr); } else { - cm->SetProperty(propertyName, propertyValue.c_str()); + cm->SetProperty(propertyName, propertyValue); } } @@ -520,7 +521,7 @@ bool HandleDirectoryMode(cmExecutionStatus& status, if (remove) { mf->SetProperty(propertyName, nullptr); } else { - mf->SetProperty(propertyName, propertyValue.c_str()); + mf->SetProperty(propertyName, propertyValue); } } @@ -631,7 +632,7 @@ bool HandleSource(cmSourceFile* sf, const std::string& propertyName, if (remove) { sf->SetProperty(propertyName, nullptr); } else { - sf->SetProperty(propertyName, propertyValue.c_str()); + sf->SetProperty(propertyName, propertyValue); } } return true; @@ -681,7 +682,7 @@ bool HandleTest(cmTest* test, const std::string& propertyName, if (remove) { test->SetProperty(propertyName, nullptr); } else { - test->SetProperty(propertyName, propertyValue.c_str()); + test->SetProperty(propertyName, propertyValue); } } @@ -719,7 +720,7 @@ bool HandleCacheMode(cmExecutionStatus& status, for (std::string const& name : names) { // Get the source file. cmake* cm = status.GetMakefile().GetCMakeInstance(); - cmProp existingValue = cm->GetState()->GetCacheEntryValue(name); + cmValue existingValue = cm->GetState()->GetCacheEntryValue(name); if (existingValue) { if (!HandleCacheEntry(name, status.GetMakefile(), propertyName, propertyValue, appendAsString, appendMode, |