mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 12:30:19 +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)
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
# use IPO
|
# use IPO
|
||||||
|
option(PK_BUILD_WITH_IPO "" TRUE)
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
check_ipo_supported(RESULT result)
|
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)
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
else()
|
else()
|
||||||
message(WARNING ">> IPO disabled. You will not get the best performance.")
|
message(WARNING ">> IPO disabled. You will not get the best performance.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user