diff --git a/.cirrus.yml b/.cirrus.yml index 07218cc8..822afa03 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -13,10 +13,10 @@ FreeBSD_task: freebsd_instance: image_family: freebsd-14-0 prepare_script: - - pkg install -y pkgconf cmake git libsodium $SSL + - pkg install -y pkgconf cmake git libsodium cpu_features $SSL - git submodule update --init --recursive configure_script: - - ./configure + - CMAKE_FLAGS="-DUSE_SYSTEM_CPU_FEATURES=1" CFLAGS="-I/usr/local/include/cpu_features" ./configure build_script: - make -j $(sysctl -n hw.ncpu || echo 4) -C build test_script: diff --git a/src/Mayaqua/CMakeLists.txt b/src/Mayaqua/CMakeLists.txt index 8544e45d..9418b824 100644 --- a/src/Mayaqua/CMakeLists.txt +++ b/src/Mayaqua/CMakeLists.txt @@ -121,6 +121,8 @@ if(UNIX) message("cpu_features is not available on ${CMAKE_SYSTEM_NAME}") add_definitions(-DSKIP_CPU_FEATURES) elseif(USE_SYSTEM_CPU_FEATURES) + CHECK_INCLUDE_FILE(cpu_features_macros.h HAVE_CPU_FEATURES) + message("-- Using system's cpu_features") target_link_libraries(mayaqua PRIVATE cpu_features) else() add_subdirectory(3rdparty/cpu_features)