mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 04:20:17 +00:00
add PK_BUILD_WITH_IPO
This commit is contained in:
parent
8a98208a75
commit
1ea83cf10b
@ -6,10 +6,11 @@ set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
# use IPO
|
||||
option(PK_BUILD_WITH_IPO "" TRUE)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT result)
|
||||
|
||||
if(result AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
if(result AND PK_BUILD_WITH_IPO)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING ">> IPO disabled. You will not get the best performance.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user