diff options
author | Brad King <brad.king@kitware.com> | 2021-11-23 14:54:56 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-11-23 14:55:17 (GMT) |
commit | 4133c426c2efe3226a3c145af8cce8fd658776c8 (patch) | |
tree | b7316fe6648d28cb24b3b594ca35fafad8708562 /Source/cmMakefile.cxx | |
parent | 0e0a2f3fe208d361779bb8b176d3770bdade4cd2 (diff) | |
parent | 5b1ed2a64650405127d434f6267fb10baf1401d4 (diff) | |
download | CMake-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.cxx | 3 |
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( |