File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ function(set_compiler_flag _result _lang)
3838 set (_flag_found FALSE )
3939 # loop over all flags, try to find the first which works
4040 foreach (flag IN ITEMS ${_list_of_flags} )
41-
41+ # Note: since cmake-3.17-rc1 its not sufficient to unset _flag_works
42+ # from the cache, so this double-unset is relevant:
43+ unset (_flag_works)
4244 unset (_flag_works CACHE )
4345 if (_lang STREQUAL "C" )
4446 check_c_compiler_flag("${flag} " _flag_works)
@@ -53,9 +55,16 @@ function(set_compiler_flag _result _lang)
5355 # if the flag works, use it, and exit
5456 # otherwise try next flag
5557 if (_flag_works)
58+ if (NOT CMAKE_REQUIRED_QUIET)
59+ message (STATUS "Found flag ${flag} for language ${_lang} is supported" )
60+ endif ()
5661 set (${_result} "${flag} " PARENT_SCOPE)
5762 set (_flag_found TRUE )
5863 break ()
64+ else ()
65+ if (NOT CMAKE_REQUIRED_QUIET)
66+ message (STATUS "Found flag ${flag} for language ${_lang} is not supported" )
67+ endif ()
5968 endif ()
6069 endforeach ()
6170
You can’t perform that action at this time.
0 commit comments