You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
612 B

get_property (isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(isMultiConfig)
set(CMAKE_CONFIGURATION_TYPES "Custom" CACHE STRING "" FORCE)
else()
set(CMAKE_BUILD_TYPE "Custom" CACHE STRING "" FORCE)
endif()
enable_language(C)
string(APPEND CMAKE_C_FLAGS " -w -O")
set(CMAKE_C_FLAGS_CUSTOM "-O0")
add_executable(order order.c)
set_property(TARGET order APPEND PROPERTY COMPILE_OPTIONS -O1)
add_library(iface INTERFACE)
set_property(TARGET iface APPEND PROPERTY INTERFACE_COMPILE_OPTIONS -O2)
target_link_libraries(order PRIVATE iface)
set_property(SOURCE order.c PROPERTY COMPILE_OPTIONS -O3)