summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-18 18:25:52 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-18 18:25:52 (GMT)
commit588c9c414576c1a1c9f3f573186dfd9b552a1954 (patch)
tree625f41af71d74838a15626e38446c54039cc7735 /Source
parent263d733a58c73a8a8ef2158cae79949144e855f1 (diff)
parent50e90e282847f1109e5559d49fc12214b3493fff (diff)
downloadCMake-588c9c414576c1a1c9f3f573186dfd9b552a1954.zip
CMake-588c9c414576c1a1c9f3f573186dfd9b552a1954.tar.gz
CMake-588c9c414576c1a1c9f3f573186dfd9b552a1954.tar.bz2
Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7803
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;