summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-12 15:43:35 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-12 17:30:14 (GMT)
commit1b5e52fd651ab17b3f9efb8f3e2e069550bf7a66 (patch)
tree2d02b554d043337f57a2f34976ce7403b947c877 /Source/cmCoreTryCompile.cxx
parent2deb9b7f3495a9083b8d5341f867fed615da1470 (diff)
downloadCMake-1b5e52fd651ab17b3f9efb8f3e2e069550bf7a66.zip
CMake-1b5e52fd651ab17b3f9efb8f3e2e069550bf7a66.tar.gz
CMake-1b5e52fd651ab17b3f9efb8f3e2e069550bf7a66.tar.bz2
Genex: Fix COMPILE_LANGUAGE propagation through try_compile
When evaluating include directories during export to a `try_compile` test project, thread the compile language through to the generator expression evaluator so it can support `$<COMPILE_LANGUAGE:...>`. Issue: #17811
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 34c6175..26e0db9 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -580,7 +580,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
if (!targets.empty()) {
std::string fname = "/" + std::string(targetName) + "Targets.cmake";
- cmExportTryCompileFileGenerator tcfg(gg, targets, this->Makefile);
+ cmExportTryCompileFileGenerator tcfg(gg, targets, this->Makefile,
+ testLangs);
tcfg.SetExportFile((this->BinaryDirectory + fname).c_str());
tcfg.SetConfig(tcConfig);