summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCoreTryCompile.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 5418e7c..b1d37a6 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -582,6 +582,12 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
fprintf(fout, "cmake_policy(SET CMP0126 OLD)\n");
}
+ /* Set language extensions policy to match outer project. */
+ if (this->Makefile->GetPolicyStatus(cmPolicies::CMP0128) !=
+ cmPolicies::NEW) {
+ fprintf(fout, "cmake_policy(SET CMP0128 OLD)\n");
+ }
+
std::string projectLangs;
for (std::string const& li : testLangs) {
projectLangs += " " + li;