if(WIN32) add_compile_options($<$:/Od>) add_compile_options($<$:/O1>) add_compile_options($<$:/Ox>) add_compile_options($<$:/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.9)) set(CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK ON) endif() endif() add_compile_options($<$:-O0>) if (CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK) add_compile_options($<$>:-O1>) else() add_compile_options($<$:-O2>) add_compile_options($<$:-O3>) add_compile_options($<$:-O2>) endif() endif()