summaryrefslogtreecommitdiff
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-09-21 17:12:35 +0200
committerMarc Chevrier <marc.chevrier@gmail.com>2021-09-21 17:14:04 +0200
commitcc56dc7468bfee49dedbf395d6fca5c372d200fe (patch)
treec4463a4dcdada55ca57cba3713fea88d8d2f3f57 /Source/cmCoreTryCompile.cxx
parent62834c07603e82aafabc082bbbcf74179a4cda27 (diff)
downloadcmake-cc56dc7468bfee49dedbf395d6fca5c372d200fe.tar.gz
Rename cmProp in cmValue
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 0c85d28725..02d559be50 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -19,11 +19,11 @@
#include "cmMessageType.h"
#include "cmOutputConverter.h"
#include "cmPolicies.h"
-#include "cmProperty.h"
#include "cmState.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
+#include "cmValue.h"
#include "cmVersion.h"
#include "cmake.h"
@@ -246,7 +246,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
this->SrcFileSignature = true;
cmStateEnums::TargetType targetType = cmStateEnums::EXECUTABLE;
- cmProp tt = this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_TARGET_TYPE");
+ cmValue tt = this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_TARGET_TYPE");
if (!isTryRun && cmNonempty(tt)) {
if (*tt == cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) {
targetType = cmStateEnums::EXECUTABLE;
@@ -540,7 +540,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
return -1;
}
- cmProp def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");
+ cmValue def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");
fprintf(fout, "cmake_minimum_required(VERSION %u.%u.%u.%u)\n",
cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion(),
cmVersion::GetPatchVersion(), cmVersion::GetTweakVersion());
@@ -549,7 +549,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
}
/* Set MSVC runtime library policy to match our selection. */
- if (cmProp msvcRuntimeLibraryDefault =
+ if (cmValue msvcRuntimeLibraryDefault =
this->Makefile->GetDefinition(kCMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT)) {
fprintf(fout, "cmake_policy(SET CMP0091 %s)\n",
!msvcRuntimeLibraryDefault->empty() ? "NEW" : "OLD");
@@ -564,7 +564,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
}
/* Set ARMClang cpu/arch policy to match outer project. */
- if (cmProp cmp0123 =
+ if (cmValue cmp0123 =
this->Makefile->GetDefinition(kCMAKE_ARMClang_CMP0123)) {
fprintf(fout, "cmake_policy(SET CMP0123 %s)\n",
*cmp0123 == "NEW"_s ? "NEW" : "OLD");
@@ -582,11 +582,11 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
projectLangs += " " + li;
std::string rulesOverrideBase = "CMAKE_USER_MAKE_RULES_OVERRIDE";
std::string rulesOverrideLang = cmStrCat(rulesOverrideBase, "_", li);
- if (cmProp rulesOverridePath =
+ if (cmValue rulesOverridePath =
this->Makefile->GetDefinition(rulesOverrideLang)) {
fprintf(fout, "set(%s \"%s\")\n", rulesOverrideLang.c_str(),
rulesOverridePath->c_str());
- } else if (cmProp rulesOverridePath2 =
+ } else if (cmValue rulesOverridePath2 =
this->Makefile->GetDefinition(rulesOverrideBase)) {
fprintf(fout, "set(%s \"%s\")\n", rulesOverrideBase.c_str(),
rulesOverridePath2->c_str());
@@ -604,7 +604,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
fprintf(fout, "set(CMAKE_VERBOSE_MAKEFILE 1)\n");
for (std::string const& li : testLangs) {
std::string langFlags = "CMAKE_" + li + "_FLAGS";
- cmProp flags = this->Makefile->GetDefinition(langFlags);
+ cmValue flags = this->Makefile->GetDefinition(langFlags);
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li.c_str(),
cmOutputConverter::EscapeForCMake(*flags).c_str());
fprintf(fout,
@@ -643,7 +643,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
for (std::string const& li : testLangs) {
std::string const langFlagsCfg =
cmStrCat("CMAKE_", li, "_FLAGS_", cfg);
- cmProp flagsCfg = this->Makefile->GetDefinition(langFlagsCfg);
+ cmValue flagsCfg = this->Makefile->GetDefinition(langFlagsCfg);
fprintf(fout, "set(%s %s)\n", langFlagsCfg.c_str(),
cmOutputConverter::EscapeForCMake(*flagsCfg).c_str());
}
@@ -675,7 +675,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
case cmPolicies::NEW:
// NEW behavior is to pass linker flags.
{
- cmProp exeLinkFlags =
+ cmValue exeLinkFlags =
this->Makefile->GetDefinition("CMAKE_EXE_LINKER_FLAGS");
fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS %s)\n",
cmOutputConverter::EscapeForCMake(*exeLinkFlags).c_str());
@@ -760,7 +760,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
vars.insert(kCMAKE_WARN_DEPRECATED);
vars.emplace("CMAKE_MSVC_RUNTIME_LIBRARY"_s);
- if (cmProp varListStr = this->Makefile->GetDefinition(
+ if (cmValue varListStr = this->Makefile->GetDefinition(
kCMAKE_TRY_COMPILE_PLATFORM_VARIABLES)) {
std::vector<std::string> varList = cmExpandedList(*varListStr);
vars.insert(varList.begin(), varList.end());
@@ -799,7 +799,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
cmLocalGenerator doesn't allow building for "the other"
architecture only via CMAKE_OSX_ARCHITECTURES.
*/
- if (cmProp tcArchs = this->Makefile->GetDefinition(
+ if (cmValue tcArchs = this->Makefile->GetDefinition(
kCMAKE_TRY_COMPILE_OSX_ARCHITECTURES)) {
vars.erase(kCMAKE_OSX_ARCHITECTURES);
std::string flag = "-DCMAKE_OSX_ARCHITECTURES=" + *tcArchs;
@@ -807,7 +807,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
}
for (std::string const& var : vars) {
- if (cmProp val = this->Makefile->GetDefinition(var)) {
+ if (cmValue val = this->Makefile->GetDefinition(var)) {
std::string flag = "-D" + var + "=" + *val;
cmakeFlags.push_back(std::move(flag));
}
@@ -952,7 +952,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
if (this->Makefile->GetState()->UseGhsMultiIDE()) {
// Forward the GHS variables to the inner project cache.
for (std::string const& var : ghs_platform_vars) {
- if (cmProp val = this->Makefile->GetDefinition(var)) {
+ if (cmValue val = this->Makefile->GetDefinition(var)) {
std::string flag = "-D" + var + "=" + "'" + *val + "'";
cmakeFlags.push_back(std::move(flag));
}
@@ -1094,7 +1094,7 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName,
std::vector<std::string> searchDirs;
searchDirs.emplace_back();
- cmProp config =
+ cmValue config =
this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
// if a config was specified try that first
if (cmNonempty(config)) {