math/libdivide: Add NATIVE option
PR: 272497 Approved by: thierry@ (maintainer)
This commit is contained in:
parent
3a20804ab6
commit
8bafc25ae4
2 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
PORTNAME= libdivide
|
||||
DISTVERSION= 5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= math
|
||||
|
||||
MAINTAINER= thierry@FreeBSD.org
|
||||
|
@ -24,6 +25,10 @@ PLIST_FILES= include/libdivide.h \
|
|||
lib/cmake/libdivide/libdivideConfig.cmake \
|
||||
lib/cmake/libdivide/libdivideConfigVersion.cmake
|
||||
|
||||
OPTIONS_DEFINE= NATIVE
|
||||
|
||||
NATIVE_CMAKE_BOOL= FREEBSD_NATIVE
|
||||
|
||||
do-test:
|
||||
${CONFIGURE_WRKSRC}/tester
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
)
|
||||
|
||||
# Build options ################################################
|
||||
@@ -93,7 +93,6 @@ if (BUILD_TESTS AND NOT CMAKE_CROSSCOMPILING)
|
||||
@@ -93,11 +93,10 @@ if (BUILD_TESTS AND NOT CMAKE_CROSSCOMPILING)
|
||||
CPU_ARM_NEON)
|
||||
if (CPU_X86 OR CPU_ARM_NEON)
|
||||
cmake_push_check_state()
|
||||
|
@ -21,3 +21,8 @@
|
|||
check_cxx_compiler_flag(-march=native MARCH_NATIVE)
|
||||
cmake_pop_check_state()
|
||||
|
||||
- if (MARCH_NATIVE)
|
||||
+ if (MARCH_NATIVE AND FREEBSD_NATIVE)
|
||||
list(APPEND LIBDIVIDE_FLAGS "-march=native")
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue