aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-08-26 21:10:56 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-08-26 21:10:56 -0400
commitd98787eb1ba9363bb0eeb73107626ea38bc0e552 (patch)
treec28f009f5f35d773002a62dc9698acd5544ad8b7 /CMakeLists.txt
parentMerge pull request #7822 (diff)
parentcmake: test is a reserved keyword (diff)
downloadmonero-d98787eb1ba9363bb0eeb73107626ea38bc0e552.tar.xz
Merge pull request #7825
ccfed60 cmake: test is a reserved keyword (selsta) f0fa959 cmake: fix ccache detection (anon) 8dbe2e5 Daemon: Update average block size table (rbrunner7) 94bad34 wallet2: Don't auto lock device on process parsed blocks (tobtoht) 3c23aca ledger: don't lock for software device (tobtoht) 49beb8d ledger: use software device if we have view key (tobtoht) d188b5f wallet_api: getPassword (tobtoht) a395f36 depends, docker: fix bintray links (selsta) 0fecd7e blocks: fix cmake syntax (selsta) 76824bf Stop adding more outputs than bulletproof allows (Alex Opie) 67ba733 unit_tests: fix wipeable_string parse_hexstr test with latest gtest (xiphon) 402ba04 cmake: use CMAKE_CURRENT_LIST_DIR in FindLibUSB (selsta) 1565bcb epee: include public openssl header in cmake (selsta) 2e9af2a cmake: treat warnings as error in compiler flag tests (selsta) db564ef wallet_api: fix typo in exportKeyImages (selsta) 8507917 depends: add getmonero package mirror (selsta) 8716d2a cmake: fix non portable code (selsta)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66f4d0363..362ca8d56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,16 +71,18 @@ function (die msg)
endfunction ()
function (add_c_flag_if_supported flag var)
- string(REPLACE "-" "_" supported ${flag}_c)
- check_c_compiler_flag(${flag} ${supported})
+ set(TMP "-Werror ${flag}")
+ string(REGEX REPLACE "[- ]" "_" supported ${TMP}_c)
+ check_c_compiler_flag(${TMP} ${supported})
if(${${supported}})
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
endif()
endfunction()
function (add_cxx_flag_if_supported flag var)
- string(REPLACE "-" "_" supported ${flag}_cxx)
- check_cxx_compiler_flag(${flag} ${supported})
+ set(TMP "-Werror ${flag}")
+ string(REGEX REPLACE "[- ]" "_" supported ${TMP}_cxx)
+ check_cxx_compiler_flag(${TMP} ${supported})
if(${${supported}})
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
endif()