Another potential fix for the MacOS issues

This commit is contained in:
AlexandreRouma 2021-10-03 17:48:32 +02:00
parent fcd759654c
commit 83fc20cacc
2 changed files with 4 additions and 6 deletions

View File

@ -44,6 +44,9 @@ option(OPT_BUILD_FREQUENCY_MANAGER "Build the Frequency Manager module" ON)
option(OPT_BUILD_RECORDER "Audio and baseband recorder" ON)
option(OPT_BUILD_RIGCTL_SERVER "Rigctl backend for controlling SDR++ with software like gpredict" ON)
# Core of SDR++
add_subdirectory("core")
# Compiler arguments for each platform
if (MSVC)
add_compile_options(/O2 /Ob2 /std:c++17 /EHsc)
@ -53,10 +56,6 @@ else ()
add_compile_options(-O3 -std=c++17)
endif ()
# Core of SDR++
add_subdirectory("core")
# Source modules
if (OPT_BUILD_AIRSPY_SOURCE)
add_subdirectory("source_modules/airspy_source")

View File

@ -18,8 +18,7 @@ add_library(sdrpp_core SHARED ${SRC})
if (MSVC)
target_compile_options(sdrpp_core PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(sdrpp_core PRIVATE -O3 -Wno-unused-command-line-argument -undefined dynamic_lookup)
target_compile_options(sdrpp_core PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-std=c++17>)
target_compile_options(sdrpp_core PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(sdrpp_core PRIVATE -O3 -std=c++17)
endif ()