We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-Wno-some-warning
1 parent 908e02d commit 1e97094Copy full SHA for 1e97094
cmake/TryAppendCFlags.cmake
@@ -10,7 +10,13 @@ function(secp256k1_check_c_flags_internal flags output)
10
11
# This avoids running a linker.
12
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
13
- check_c_compiler_flag("${flags}" ${result})
+
14
+ # Some compilers (GCC) produce no diagnostic for -Wno-unknown-warning
15
+ # unless other diagnostics are being produced. Therefore, test the
16
+ # -Wsome-warning case instead of the -Wno-some-warning one.
17
+ string(REPLACE "-Wno-" "-W" non_negated_flags "${flags}")
18
19
+ check_c_compiler_flag("${non_negated_flags}" ${result})
20
21
set(${output} ${${result}} PARENT_SCOPE)
22
endfunction()
0 commit comments