summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-23 14:54:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-11-23 14:55:17 (GMT)
commit4133c426c2efe3226a3c145af8cce8fd658776c8 (patch)
treeb7316fe6648d28cb24b3b594ca35fafad8708562 /Source/cmGlobalGenerator.cxx
parent0e0a2f3fe208d361779bb8b176d3770bdade4cd2 (diff)
parent5b1ed2a64650405127d434f6267fb10baf1401d4 (diff)
downloadCMake-4133c426c2efe3226a3c145af8cce8fd658776c8.zip
CMake-4133c426c2efe3226a3c145af8cce8fd658776c8.tar.gz
CMake-4133c426c2efe3226a3c145af8cce8fd658776c8.tar.bz2
Merge topic 'env-init-configs'
5b1ed2a646 try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env vars Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6755
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index b02dc29..0a2e7b5 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -503,7 +503,8 @@ bool cmGlobalGenerator::CheckLanguages(
void cmGlobalGenerator::EnableLanguage(
std::vector<std::string> const& languages, cmMakefile* mf, bool optional)
{
- if (!this->IsMultiConfig()) {
+ if (!this->IsMultiConfig() &&
+ !this->GetCMakeInstance()->GetIsInTryCompile()) {
std::string envBuildType;
if (!mf->GetDefinition("CMAKE_BUILD_TYPE") &&
cmSystemTools::GetEnv("CMAKE_BUILD_TYPE", envBuildType)) {