summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.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/cmMakefile.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/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index fe56dec..661cb05 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3138,7 +3138,8 @@ void cmMakefile::InitCMAKE_CONFIGURATION_TYPES(std::string const& genDefault)
return;
}
std::string initConfigs;
- if (!cmSystemTools::GetEnv("CMAKE_CONFIGURATION_TYPES", initConfigs)) {
+ if (this->GetCMakeInstance()->GetIsInTryCompile() ||
+ !cmSystemTools::GetEnv("CMAKE_CONFIGURATION_TYPES", initConfigs)) {
initConfigs = genDefault;
}
this->AddCacheDefinition(