Skip to content

Commit 82ba925

Browse files
committed
Merge bitcoin/bitcoin#31366: cmake: Check -Wno-* compiler options for leveldb target
9e4a4b4 cmake: Check `-Wno-*` compiler options for `leveldb` target (Hennadii Stepanov) Pull request description: Otherwise, https://cirrus-ci.com/task/4830737755537408: ``` At global scope: cc1plus: note: unrecognized command-line option ‘-Wno-conditional-uninitialized’ may have been intended to silence earlier diagnostics ``` ACKs for top commit: TheCharlatan: ACK 9e4a4b4 Tree-SHA512: 05553c80399180e01d45c3f02074ca0ce620011b29b03bef5433b87c9d88fd281fb6bf0203fc6fff590f3780c182a3fab8307002536b6350e03748420c346602
2 parents f236854 + 9e4a4b4 commit 82ba925

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmake/leveldb.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ if(MSVC)
8787
_CRT_NONSTDC_NO_WARNINGS
8888
)
8989
else()
90-
target_compile_options(nowarn_leveldb_interface INTERFACE
91-
-Wno-conditional-uninitialized
92-
-Wno-suggest-override
90+
try_append_cxx_flags("-Wconditional-uninitialized" TARGET nowarn_leveldb_interface SKIP_LINK
91+
IF_CHECK_PASSED "-Wno-conditional-uninitialized"
92+
)
93+
try_append_cxx_flags("-Wsuggest-override" TARGET nowarn_leveldb_interface SKIP_LINK
94+
IF_CHECK_PASSED "-Wno-suggest-override"
9395
)
9496
endif()
9597

0 commit comments

Comments
 (0)