2016-07-04 10:43:19 +00:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
project(MMMCalc)
|
|
|
|
|
2016-07-04 14:17:16 +00:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "")
|
|
|
|
set(CMAKE_BUILD_TYPE RelWithDebInfo)
|
|
|
|
endif()
|
|
|
|
|
2016-07-07 18:45:57 +00:00
|
|
|
set(CMAKE_C_FLAGS "-std=c11 -Wall -Wextra -Werror -Wpedantic -Wfatal-errors -Wmissing-declarations -pedantic-errors")
|
2016-07-04 10:43:19 +00:00
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -O0")
|
|
|
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
|
|
|
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -O3")
|
|
|
|
set(CMAKE_C_FLAGS_MIN_SIZEREL "${CMAKE_C_FLAGS} -Os")
|
|
|
|
|
|
|
|
set(SRCS
|
2016-07-08 18:01:33 +00:00
|
|
|
src/main.c)
|
2016-07-04 10:43:19 +00:00
|
|
|
|
|
|
|
add_executable(mmmcalc ${SRCS})
|