blob: 742ae2aeccc01fd3f59255be3510d26a6e02ecf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
if(WIN32)
add_compile_options($<$<CONFIG:Debug>:/Od>)
add_compile_options($<$<CONFIG:Checked>:/O1>)
add_compile_options($<$<CONFIG:Release>:/Ox>)
add_compile_options($<$<CONFIG:RelWithDebInfo>:/O2>)
elseif(CLR_CMAKE_PLATFORM_UNIX)
set(CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK OFF)
if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm" OR CLR_CMAKE_TARGET_ARCH STREQUAL "armel")
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8))
set(CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK ON)
endif()
endif()
add_compile_options($<$<CONFIG:Debug>:-O0>)
if (CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK)
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-O1>)
else()
add_compile_options($<$<CONFIG:Checked>:-O2>)
add_compile_options($<$<CONFIG:Release>:-O3>)
add_compile_options($<$<CONFIG:RelWithDebInfo>:-O2>)
endif()
endif()
|