CMakeLists.txt 972 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)

project("surfaces-unies")

set(TGT "surfaces-unies")
set(${TGT}_VERSION_MAJOR 0)
set(${TGT}_VERSION_MINOR 1)

10
set(CC_COVERAGE_COMPILE_FLAGS "-Wall -Wextra -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-align -Wshadow -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline")
11
set(CMAKE_C_FLAGS_DEBUG "${CC_COVERAGE_COMPILE_FLAGS} -DDebug -g")
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
set(CMAKE_C_FLAGS_RELEASE "${CC_COVERAGE_COMPILE_FLAGS} -O3")

set(CMAKE_CC_STANDARD 11)
set(CMAKE_CC_STANDARD_REQUIRED YES)
set(CMAKE_CC_EXTENSIONS OFF)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "../debug/")

set(CMAKE_CC_FLAGS "${CMAKE_CC_FLAGS} ${CC_COVERAGE_COMPILE_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CC_COVERAGE_COMPILE_FLAGS}")

include_directories(include)
file(GLOB SOURCES "src/*")
add_executable(${TGT} ${SOURCES})