1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-01-27 17:49:56 +03:00

CI: Use system's cpu_features in FreeBSD CI

This commit is contained in:
Koichiro Iwao 2025-01-15 00:05:46 +09:00
parent e2e8193495
commit 10a2806f12
2 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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)