From d46590910c2c3c9dfd79dfc4e81ba91eb1ea6d8d Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Sep 2020 10:28:47 -0400 Subject: Check*CompilerFlag: Do not set result as a normal variable too Refactoring in commit cb984c6627 (Check*CompilerFlag: Modernize modules, 2019-12-09, v3.17.0-rc1~320^2) accidentally left the result set as a normal variable in addition to as a cache entry. This is not specified by the documentation, and is not the behavior in CMake 3.16 and below. Fixes: #21207 --- Modules/CheckCCompilerFlag.cmake | 1 - Modules/CheckCXXCompilerFlag.cmake | 1 - 2 files changed, 2 deletions(-) diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index 6d65313..1452b51 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -54,5 +54,4 @@ function(check_c_compiler_flag _flag _var) foreach(v IN LISTS _locale_vars) set(ENV{${v}} ${_locale_vars_saved_${v}}) endforeach() - set(${_var} "${${_var}}" PARENT_SCOPE) endfunction() diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake index 5e07c25..544e9ac 100644 --- a/Modules/CheckCXXCompilerFlag.cmake +++ b/Modules/CheckCXXCompilerFlag.cmake @@ -54,5 +54,4 @@ function(check_cxx_compiler_flag _flag _var) foreach(v IN LISTS _locale_vars) set(ENV{${v}} ${_locale_vars_saved_${v}}) endforeach() - set(${_var} "${${_var}}" PARENT_SCOPE) endfunction() -- cgit v0.12