mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 12:11:04 -06:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user