summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCoreTryCompile.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 39c2b3a..caa413b 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -872,9 +872,10 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
}
// Forward a set of variables to the inner project cache.
- if (this->SrcFileSignature ||
- this->Makefile->GetPolicyStatus(cmPolicies::CMP0137) ==
- cmPolicies::NEW) {
+ if ((this->SrcFileSignature ||
+ this->Makefile->GetPolicyStatus(cmPolicies::CMP0137) ==
+ cmPolicies::NEW) &&
+ !this->Makefile->IsOn("CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES")) {
std::set<std::string> vars;
vars.insert(&c_properties[lang_property_start],
&c_properties[lang_property_start + lang_property_size]);