39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
--- CMakeLists.txt.orig 2026-09-06 09:28:51 UTC
|
|
+++ CMakeLists.txt
|
|
@@ -1,4 +1,4 @@
|
|
-cmake_minimum_required(VERSION 3.5...4.2)
|
|
+cmake_minimum_required(VERSION 3.5)
|
|
set(LIBDIVIDE_VERSION "5.4.0")
|
|
project(libdivide C CXX)
|
|
|
|
@@ -17,13 +17,13 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") # clang-cl
|
|
add_compile_options("/W4;/WX;")
|
|
else() # clang native
|
|
- add_compile_options("-Wall;-Wextra;-pedantic;-Werror")
|
|
+ add_compile_options("-Wall;-Wextra;-pedantic")
|
|
endif()
|
|
else()
|
|
add_compile_options(
|
|
"$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX>"
|
|
- "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wextra;-pedantic;-Werror>"
|
|
- "$<$<CXX_COMPILER_ID:AppleClang>:-Wall;-Wextra;-pedantic;-Werror>"
|
|
+ "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wextra;-pedantic>"
|
|
+ "$<$<CXX_COMPILER_ID:AppleClang>:-Wall;-Wextra;-pedantic>"
|
|
)
|
|
endif()
|
|
|
|
@@ -118,11 +118,10 @@ if (LIBDIVIDE_BUILD_TESTS AND NOT CMAKE_CROSSCOMPILING
|
|
CPU_ARM_NEON)
|
|
if (CPU_X86 OR CPU_ARM_NEON)
|
|
cmake_push_check_state()
|
|
- set(CMAKE_REQUIRED_FLAGS -Werror)
|
|
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()
|