mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-02 07:43:28 +01:00
Merge pull request #7847
0a021c3
CMake: document -Werror for add_c_flag_if_supported() from #7718 (mj-xmr)
This commit is contained in:
commit
4ada08ad9a
@ -106,6 +106,8 @@ function (die msg)
|
|||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
function (add_c_flag_if_supported flag var)
|
function (add_c_flag_if_supported flag var)
|
||||||
|
# Prepending the flag with -Werror will only add the flag,
|
||||||
|
# if it doesn't result in generation of a warning of using a flag unknown to the compiler.
|
||||||
set(TMP "-Werror ${flag}")
|
set(TMP "-Werror ${flag}")
|
||||||
string(REGEX REPLACE "[- ]" "_" supported ${TMP}_c)
|
string(REGEX REPLACE "[- ]" "_" supported ${TMP}_c)
|
||||||
check_c_compiler_flag(${TMP} ${supported})
|
check_c_compiler_flag(${TMP} ${supported})
|
||||||
|
Loading…
Reference in New Issue
Block a user