mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
fix gcc/clang can't find pthread on limux
This commit is contained in:
parent
945f614b98
commit
4d8e316c0b
@ -10,7 +10,7 @@ double fsum(double* aptr, int n)
|
||||
Y = aptr[i] - C;
|
||||
T = sum + Y;
|
||||
C = T - sum - Y;
|
||||
sum = Y;
|
||||
sum = T;
|
||||
}
|
||||
return sum;
|
||||
}
|
@ -50,6 +50,13 @@ if(PK_ENABLE_DETERMINISTIC_FLOAT)
|
||||
add_subdirectory(3rd/math)
|
||||
include_directories(3rd/math)
|
||||
add_definitions(-DPK_ENABLE_DETERMINISTIC_FLOAT)
|
||||
if(MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-model=strict -O2")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(PK_BUILD_MODULE_LZ4 "" OFF)
|
||||
@ -114,6 +121,9 @@ if(PK_BUILD_WITH_UNITY)
|
||||
endif()
|
||||
|
||||
############################################
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(${PROJECT_NAME} pthread)
|
||||
endif()
|
||||
if(PK_BUILD_MODULE_LZ4)
|
||||
target_link_libraries(${PROJECT_NAME} lz4)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user