From: A. Maitland Bottoms Date: Fri, 22 Oct 2021 03:30:05 +0000 (+0100) Subject: use system cpu_features package X-Git-Tag: archive/raspbian/2.5.0-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b2b843163f10697ebc15ddbae307f6f0bb8c1d5c;p=volk.git use system cpu_features package Author: Shengjing Zhu Last-Update: 2020-12-26 Gbp-Pq: Name use-system-cpu-features-package.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 34eb204..c137a3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,17 +142,7 @@ else() option(VOLK_CPU_FEATURES "Volk uses cpu_features" OFF) endif() if (VOLK_CPU_FEATURES) - if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cpu_features/CMakeLists.txt" ) - message(FATAL_ERROR "cpu_features/CMakeLists.txt not found. Did you forget to git clone recursively?\nFix with: git submodule update --init") - endif() - message(STATUS "Building Volk with cpu_features") - set(BUILD_PIC ON CACHE BOOL - "Build cpu_features with Position Independent Code (PIC)." - FORCE) - set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}") - set(BUILD_SHARED_LIBS OFF) - add_subdirectory(cpu_features) - set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}") + find_package(CpuFeatures) else() message(STATUS "Building Volk without cpu_features") endif() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fb9a8f9..5764cac 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -517,7 +517,7 @@ target_include_directories(volk_obj if(VOLK_CPU_FEATURES) set_source_files_properties(volk_cpu.c PROPERTIES COMPILE_DEFINITIONS "VOLK_CPU_FEATURES=1") target_include_directories(volk_obj - PRIVATE $ + PRIVATE $ ) endif()