mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-07-09 04:43:14 -04:00
fix: guard GCC-specific COMPILE_FLAGS in modemmeshcore with if (NOT MSVC)
The Monocypher vendored C files use -Wno-unused-function / -Wno-unused-parameter compile flags that are GCC/Clang-only syntax. MSVC chokes on them with: cl : Command line error D8021 : invalid numeric argument '/Wno-unused-function' Wrap the set_source_files_properties call in if (NOT MSVC) so the flags are applied on macOS/Linux but skipped on Windows. The swagger CMakeLists.txt uses the same pattern.
This commit is contained in:
@@ -33,9 +33,11 @@ add_library(modemmeshcore
|
||||
|
||||
# Vendored Monocypher (BSD-2-Clause OR CC0-1.0) is intentionally untouched;
|
||||
# silence sdrangel's strict-warning policy for the two .c files.
|
||||
set_source_files_properties(monocypher.c monocypher-ed25519.c
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-unused-parameter"
|
||||
)
|
||||
if (NOT MSVC)
|
||||
set_source_files_properties(monocypher.c monocypher-ed25519.c
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-unused-parameter"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(modemmeshcore
|
||||
Qt::Core
|
||||
|
||||
Reference in New Issue
Block a user