mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
update cmakelists
This commit is contained in:
parent
87c9c1aae9
commit
62bf58dd2d
@ -21,7 +21,7 @@ if(MSVC)
|
|||||||
add_definitions(-DNDEBUG)
|
add_definitions(-DNDEBUG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PK_ENABLE_DETERMINISM)
|
if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Oi-")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Oi-")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
@ -35,7 +35,7 @@ else()
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shorten-64-to-32")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shorten-64-to-32")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PK_ENABLE_DETERMINISM)
|
if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexcess-precision=standard -ffp-contract=off")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexcess-precision=standard -ffp-contract=off")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -52,10 +52,7 @@ option(PK_ENABLE_DETERMINISTIC_FLOAT "" OFF)
|
|||||||
if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
||||||
add_subdirectory(3rd/math)
|
add_subdirectory(3rd/math)
|
||||||
include_directories(3rd/math)
|
include_directories(3rd/math)
|
||||||
add_definitions(-DPK_ENABLE_DETERMINISTIC_FLOAT)
|
add_definitions(-DPK_ENABLE_DETERMINISTIC_FLOAT=1)
|
||||||
if(NOT MSVC)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexcess-precision=standard -ffp-contract=off")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PK_ENABLE_WATCHDOG)
|
if(PK_ENABLE_WATCHDOG)
|
||||||
@ -94,7 +91,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
if(NOT PK_ENABLE_DETERMINISM)
|
if(NOT PK_ENABLE_DETERMINISTIC_FLOAT)
|
||||||
# use platform libm
|
# use platform libm
|
||||||
target_link_libraries(${PROJECT_NAME} m)
|
target_link_libraries(${PROJECT_NAME} m)
|
||||||
endif()
|
endif()
|
||||||
@ -114,6 +111,10 @@ endif()
|
|||||||
|
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
|
if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
||||||
|
target_link_libraries(${PROJECT_NAME} musl_math)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(PK_BUILD_MODULE_LZ4)
|
if(PK_BUILD_MODULE_LZ4)
|
||||||
target_link_libraries(${PROJECT_NAME} lz4)
|
target_link_libraries(${PROJECT_NAME} lz4)
|
||||||
endif()
|
endif()
|
||||||
@ -121,7 +122,3 @@ endif()
|
|||||||
if(PK_BUILD_MODULE_LIBHV)
|
if(PK_BUILD_MODULE_LIBHV)
|
||||||
target_link_libraries(${PROJECT_NAME} libhv_bindings)
|
target_link_libraries(${PROJECT_NAME} libhv_bindings)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
|
||||||
target_link_libraries(${PROJECT_NAME} musl_math)
|
|
||||||
endif()
|
|
Loading…
x
Reference in New Issue
Block a user