We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
-Wno-some-warning
1 parent a526937 commit bad556aCopy full SHA for bad556a
cmake/TryAppendCFlags.cmake
@@ -10,7 +10,14 @@ 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-some-warning,
15
+ # if "some-warning" is unknown to the compiler and no other diagnostics
16
+ # are being produced. Therefore, test the -Wsome-warning case instead
17
+ # of the -Wno-some-warning one.
18
+ string(REPLACE "-Wno-" "-W" non_negated_flags "${flags}")
19
20
+ check_c_compiler_flag("${non_negated_flags}" ${result})
21
22
set(${output} ${${result}} PARENT_SCOPE)
23
endfunction()
0 commit comments