diff options
author | Brad King <brad.king@kitware.com> | 2022-10-18 18:25:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-18 18:25:26 (GMT) |
commit | 96172ba2d18b98b2a5b651dee5326d7298c5891c (patch) | |
tree | eb14171de7c42a755f0afab1b7db20b97dbf07fc /Source | |
parent | 367f10f4cbeb5d782e08a6e29ea5678fa4e71d14 (diff) | |
parent | 50e90e282847f1109e5559d49fc12214b3493fff (diff) | |
download | CMake-96172ba2d18b98b2a5b651dee5326d7298c5891c.zip CMake-96172ba2d18b98b2a5b651dee5326d7298c5891c.tar.gz CMake-96172ba2d18b98b2a5b651dee5326d7298c5891c.tar.bz2 |
Merge branch 'try_compile-CMP0128' into release-3.23
Merge-request: !7803
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 324ce87..8d7c5fa 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -577,6 +577,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; |