mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 10:52:19 -05:00
Use -O2 for Release config builds (#1083)
This commit is contained in:
parent
7f233de502
commit
9afbe42720
@ -45,11 +45,16 @@ endif()
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Global configuration types
|
# Global configuration types
|
||||||
################################################################################
|
################################################################################
|
||||||
set(CMAKE_CONFIGURATION_TYPES
|
if (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
||||||
"Debug"
|
set(CMAKE_C_FLAGS_DEBUG "-O3 -ffast-math")
|
||||||
"Release"
|
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -ffast-math")
|
||||||
CACHE STRING "" FORCE
|
set(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
|
||||||
)
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
|
||||||
|
else()
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||||
|
set(CMAKE_OBJCXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE )
|
if(NOT CMAKE_BUILD_TYPE )
|
||||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE)
|
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE)
|
||||||
|
@ -1805,7 +1805,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
|||||||
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
|
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
|
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
|
||||||
-pthread
|
-pthread
|
||||||
-O3 -ffast-math
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_options(${PROJECT_NAME} PRIVATE
|
target_link_options(${PROJECT_NAME} PRIVATE
|
||||||
|
Loading…
Reference in New Issue
Block a user