diff --git a/cmake/Modules/DetectArchitecture.cmake b/cmake/Modules/DetectArchitecture.cmake index ded8d15b3..f2d11ffbe 100644 --- a/cmake/Modules/DetectArchitecture.cmake +++ b/cmake/Modules/DetectArchitecture.cmake @@ -196,8 +196,14 @@ if (ARCHITECTURE_ARM) endif() endif() +# Extensions detection for ARM +check_symbol_exists("__ARM_NEON" "" HAS_NEON) +if (HAS_NEON) + message(STATUS "ARM Neon extensions enabled") + add_compile_definitions(USE_NEON) +endif() + # This is quite basic detection, can be extended if needed -detect_extensions(ARM_NEON) detect_extensions(AVX512F) detect_extensions(AVX2 HAS_AVX512F) detect_extensions(AVX HAS_AVX2) diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 4094cc374..205d211bd 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -18,9 +18,9 @@ if(LIBDSDCC_FOUND AND LIBMBE_FOUND) add_subdirectory(demoddsd) endif(LIBDSDCC_FOUND AND LIBMBE_FOUND) -if(CM256CC_FOUND) +if (CM256CC_FOUND AND (HAS_SSE3 OR HAS_NEON)) add_subdirectory(remotesink) -endif(CM256CC_FOUND) +endif() if (CODEC2_FOUND) add_subdirectory(demodfreedv) diff --git a/plugins/channelrx/remotesink/CMakeLists.txt b/plugins/channelrx/remotesink/CMakeLists.txt index 32a1d51bd..0f6db4a7e 100644 --- a/plugins/channelrx/remotesink/CMakeLists.txt +++ b/plugins/channelrx/remotesink/CMakeLists.txt @@ -1,10 +1,5 @@ project(remotesink) -if (ARCHITECTURE_ARM64) - message(STATUS "Compiling RemoteSink for ARM64 with USE_NEON definition") - add_compile_definitions(USE_NEON) -endif() - set(remotesink_SOURCES remotesink.cpp remotesinkbaseband.cpp diff --git a/plugins/channeltx/CMakeLists.txt b/plugins/channeltx/CMakeLists.txt index dbc10b015..4f1fc1219 100644 --- a/plugins/channeltx/CMakeLists.txt +++ b/plugins/channeltx/CMakeLists.txt @@ -11,9 +11,9 @@ add_subdirectory(udpsource) add_subdirectory(localsource) add_subdirectory(filesource) -if(CM256CC_FOUND) +if (CM256CC_FOUND AND (HAS_SSE3 OR HAS_NEON)) add_subdirectory(remotesource) -endif(CM256CC_FOUND) +endif() if (OpenCV_FOUND) add_subdirectory(modatv) diff --git a/plugins/channeltx/remotesource/CMakeLists.txt b/plugins/channeltx/remotesource/CMakeLists.txt index 141f49415..120d14104 100644 --- a/plugins/channeltx/remotesource/CMakeLists.txt +++ b/plugins/channeltx/remotesource/CMakeLists.txt @@ -1,10 +1,5 @@ project(remotesource) -if (ARCHITECTURE_ARM64) - message(STATUS "Compiling RemoteSource for ARM64 with USE_NEON definition") - add_compile_definitions(USE_NEON) -endif() - set(remotesource_SOURCES remotesource.cpp remotesourcebaseband.cpp diff --git a/plugins/samplesink/CMakeLists.txt b/plugins/samplesink/CMakeLists.txt index c86461bcf..dd452e612 100644 --- a/plugins/samplesink/CMakeLists.txt +++ b/plugins/samplesink/CMakeLists.txt @@ -5,9 +5,9 @@ add_subdirectory(fileoutput) add_subdirectory(localoutput) add_subdirectory(audiooutput) -if(CM256CC_FOUND) +if (CM256CC_FOUND AND (HAS_SSE3 OR HAS_NEON)) add_subdirectory(remoteoutput) -endif(CM256CC_FOUND) +endif() if(ENABLE_BLADERF AND LIBBLADERF_FOUND) add_subdirectory(bladerf1output) diff --git a/plugins/samplesink/remoteoutput/CMakeLists.txt b/plugins/samplesink/remoteoutput/CMakeLists.txt index 14f5aee09..6e665d909 100644 --- a/plugins/samplesink/remoteoutput/CMakeLists.txt +++ b/plugins/samplesink/remoteoutput/CMakeLists.txt @@ -1,10 +1,5 @@ project(remoteoutput) -if (ARCHITECTURE_ARM64) - message(STATUS "Compiling RemoteOutput for ARM64 with USE_NEON definition") - add_compile_definitions(USE_NEON) -endif() - set(remoteoutput_SOURCES remoteoutput.cpp remoteoutputplugin.cpp diff --git a/plugins/samplesource/CMakeLists.txt b/plugins/samplesource/CMakeLists.txt index 8d7bf3cf6..dbaecd365 100644 --- a/plugins/samplesource/CMakeLists.txt +++ b/plugins/samplesource/CMakeLists.txt @@ -4,9 +4,9 @@ add_subdirectory(fileinput) add_subdirectory(testsource) add_subdirectory(localinput) -if(CM256CC_FOUND) +if (CM256CC_FOUND AND (HAS_SSE3 OR HAS_NEON)) add_subdirectory(remoteinput) -endif(CM256CC_FOUND) +endif() if(ENABLE_AIRSPY AND LIBAIRSPY_FOUND) add_subdirectory(airspy) diff --git a/plugins/samplesource/remoteinput/CMakeLists.txt b/plugins/samplesource/remoteinput/CMakeLists.txt index 264a74743..94f5e73e0 100644 --- a/plugins/samplesource/remoteinput/CMakeLists.txt +++ b/plugins/samplesource/remoteinput/CMakeLists.txt @@ -1,10 +1,5 @@ project(remoteinput) -if (ARCHITECTURE_ARM64) - message(STATUS "Compiling RemoteInput for ARM64 with USE_NEON definition") - add_compile_definitions(USE_NEON) -endif() - set(remoteinput_SOURCES remoteinputbuffer.cpp remoteinputudphandler.cpp