diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1c3d2c2..981308e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -44,12 +44,12 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmPolicies.h" -#include "cmProperty.h" #include "cmRange.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmStateDirectory.h" #include "cmStateTypes.h" +#include "cmValue.h" #include "cmVersion.h" #include "cmWorkingDirectory.h" #include "cmake.h" @@ -199,7 +199,7 @@ std::string cmGlobalGenerator::SelectMakeProgram( { std::string makeProgram = inMakeProgram; if (cmIsOff(makeProgram)) { - cmProp makeProgramCSTR = + cmValue makeProgramCSTR = this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); if (cmIsOff(makeProgramCSTR)) { makeProgram = makeDefault; @@ -235,14 +235,14 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang, if (!optional && (path.empty() || !cmSystemTools::FileExists(path))) { return; } - cmProp cname = + cmValue cname = this->GetCMakeInstance()->GetState()->GetInitializedCacheValue(langComp); // Split compiler from arguments std::vector<std::string> cnameArgVec; if (cname && !cname->empty()) { cmExpandList(*cname, cnameArgVec); - cname = cmProp(cnameArgVec.front()); + cname = cmValue(cnameArgVec.front()); } std::string changeVars; @@ -258,7 +258,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang, cmSystemTools::ConvertToUnixSlashes(cnameString); cmSystemTools::ConvertToUnixSlashes(pathString); if (cnameString != pathString) { - cmProp cvars = this->GetCMakeInstance()->GetState()->GetGlobalProperty( + cmValue cvars = this->GetCMakeInstance()->GetState()->GetGlobalProperty( "__CMAKE_DELETE_CACHE_CHANGE_VARS_"); if (cvars) { changeVars += *cvars; @@ -801,7 +801,7 @@ void cmGlobalGenerator::EnableLanguage( std::string compilerName = cmStrCat("CMAKE_", lang, "_COMPILER"); std::string compilerEnv = cmStrCat("CMAKE_", lang, "_COMPILER_ENV_VAR"); std::ostringstream noCompiler; - cmProp compilerFile = mf->GetDefinition(compilerName); + cmValue compilerFile = mf->GetDefinition(compilerName); if (!cmNonempty(compilerFile) || cmIsNOTFOUND(*compilerFile)) { /* clang-format off */ noCompiler << @@ -922,7 +922,7 @@ void cmGlobalGenerator::EnableLanguage( void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os, std::string const& lang, - cmProp envVar) const + cmValue envVar) const { // Subclasses override this method if they do not support this advice. os << "Tell CMake where to find the compiler by setting "; @@ -1117,7 +1117,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l, } std::string linkerPrefVar = "CMAKE_" + l + "_LINKER_PREFERENCE"; - cmProp linkerPref = mf->GetDefinition(linkerPrefVar); + cmValue linkerPref = mf->GetDefinition(linkerPrefVar); int preference = 0; if (cmNonempty(linkerPref)) { if (sscanf(linkerPref->c_str(), "%d", &preference) != 1) { @@ -1143,7 +1143,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l, this->LanguageToLinkerPreference[l] = preference; std::string outputExtensionVar = "CMAKE_" + l + "_OUTPUT_EXTENSION"; - if (cmProp p = mf->GetDefinition(outputExtensionVar)) { + if (cmValue p = mf->GetDefinition(outputExtensionVar)) { std::string outputExtension = *p; this->LanguageToOutputExtension[l] = outputExtension; this->OutputExtensions[outputExtension] = outputExtension; @@ -1179,7 +1179,7 @@ void cmGlobalGenerator::FillExtensionToLanguageMap(const std::string& l, } } -cmProp cmGlobalGenerator::GetGlobalSetting(std::string const& name) const +cmValue cmGlobalGenerator::GetGlobalSetting(std::string const& name) const { assert(!this->Makefiles.empty()); return this->Makefiles[0]->GetDefinition(name); @@ -1746,7 +1746,7 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() for (std::string const& c : configs) { std::string defPropName = cmStrCat("COMPILE_DEFINITIONS_", cmSystemTools::UpperCase(c)); - if (cmProp val = mf->GetProperty(defPropName)) { + if (cmValue val = mf->GetProperty(defPropName)) { t->AppendProperty(defPropName, *val); } } @@ -1860,7 +1860,7 @@ void cmGlobalGenerator::CheckTargetProperties() } } std::vector<std::string> incs; - cmProp incDirProp = target.second.GetProperty("INCLUDE_DIRECTORIES"); + cmValue incDirProp = target.second.GetProperty("INCLUDE_DIRECTORIES"); if (!incDirProp) { continue; } @@ -2124,7 +2124,7 @@ void cmGlobalGenerator::AddMakefile(std::unique_ptr<cmMakefile> mf) // update progress // estimate how many lg there will be - cmProp numGenC = this->CMakeInstance->GetState()->GetInitializedCacheValue( + cmValue numGenC = this->CMakeInstance->GetState()->GetInitializedCacheValue( "CMAKE_NUMBER_OF_MAKEFILES"); if (!numGenC) { @@ -2183,7 +2183,7 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen, { this->SetConfiguredFilesPath(gen); this->TryCompileOuterMakefile = mf; - cmProp make = + cmValue make = gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); this->GetCMakeInstance()->AddCacheEntry( "CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH); @@ -2246,7 +2246,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, } cmMakefile* mf = root->GetMakefile(); const std::string EXCLUDE_FROM_ALL = "EXCLUDE_FROM_ALL"; - if (cmProp exclude = target->GetProperty(EXCLUDE_FROM_ALL)) { + if (cmValue exclude = target->GetProperty(EXCLUDE_FROM_ALL)) { // Expand the property value per configuration. unsigned int trueCount = 0; unsigned int falseCount = 0; @@ -2540,7 +2540,7 @@ void cmGlobalGenerator::AddGlobalTarget_Package( if (this->GetPreinstallTargetName()) { gti.Depends.emplace_back(this->GetPreinstallTargetName()); } else { - cmProp noPackageAll = + cmValue noPackageAll = mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY"); if (cmIsOff(noPackageAll)) { gti.Depends.emplace_back(this->GetAllTargetName()); @@ -2721,7 +2721,7 @@ void cmGlobalGenerator::AddGlobalTarget_Install( if (this->GetPreinstallTargetName()) { gti.Depends.emplace_back(this->GetPreinstallTargetName()); } else { - cmProp noall = mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"); + cmValue noall = mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"); if (cmIsOff(noall)) { gti.Depends.emplace_back(this->GetAllTargetName()); } @@ -2787,7 +2787,7 @@ void cmGlobalGenerator::AddGlobalTarget_Install( std::string cmGlobalGenerator::GetPredefinedTargetsFolder() const { - cmProp prop = this->GetCMakeInstance()->GetState()->GetGlobalProperty( + cmValue prop = this->GetCMakeInstance()->GetState()->GetGlobalProperty( "PREDEFINED_TARGETS_FOLDER"); if (prop) { @@ -2799,7 +2799,7 @@ std::string cmGlobalGenerator::GetPredefinedTargetsFolder() const bool cmGlobalGenerator::UseFolderProperty() const { - cmProp prop = + cmValue prop = this->GetCMakeInstance()->GetState()->GetGlobalProperty("USE_FOLDERS"); // If this property is defined, let the setter turn this on or off... @@ -3150,10 +3150,10 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target) #ifndef CMAKE_BOOTSTRAP // Check whether labels are enabled for this target. - cmProp targetLabels = target->GetProperty("LABELS"); - cmProp directoryLabels = + cmValue targetLabels = target->GetProperty("LABELS"); + cmValue directoryLabels = target->Target->GetMakefile()->GetProperty("LABELS"); - cmProp cmakeDirectoryLabels = + cmValue cmakeDirectoryLabels = target->Target->GetMakefile()->GetDefinition("CMAKE_DIRECTORY_LABELS"); if (targetLabels || directoryLabels || cmakeDirectoryLabels) { Json::Value lj_root(Json::objectValue); @@ -3221,7 +3221,7 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target) std::string const& sfp = sf->ResolveFullPath(); fout << sfp << "\n"; lj_source["file"] = sfp; - if (cmProp svalue = sf->GetProperty("LABELS")) { + if (cmValue svalue = sf->GetProperty("LABELS")) { labels.clear(); Json::Value& lj_source_labels = lj_source["labels"] = Json::arrayValue; cmExpandList(*svalue, labels); |