This commit is contained in:
blueloveTH 2024-08-25 12:04:30 +08:00
parent 7fe16eec98
commit 8634d71da6

View File

@ -12,12 +12,9 @@ check_ipo_supported(RESULT result)
if(result AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS") if(result AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else() else()
message(WARNING ">> IPO disabled. You will get very poor performance!!") message(WARNING ">> IPO disabled. You will not get the best performance.")
message(WARNING ">> IPO disabled. You will get very poor performance!!")
message(WARNING ">> IPO disabled. You will get very poor performance!!")
endif() endif()
if(MSVC) if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-")
add_compile_options(/wd4267 /wd4244) add_compile_options(/wd4267 /wd4244)
@ -47,11 +44,6 @@ if(PK_ENABLE_OS)
add_definitions(-DPK_ENABLE_OS=1) add_definitions(-DPK_ENABLE_OS=1)
endif() endif()
option(PK_ENABLE_PROFILER "" OFF)
if(PK_ENABLE_PROFILER)
add_definitions(-DPK_ENABLE_PROFILER=1)
endif()
# PK_IS_MAIN determines whether the project is being used from root # PK_IS_MAIN determines whether the project is being used from root
# or if it is added as a dependency (through add_subdirectory for example). # or if it is added as a dependency (through add_subdirectory for example).
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")