break_interval/CMakeLists.txt

19 lines
628 B
CMake

cmake_minimum_required(VERSION 3.7)
project(break_interval)
set(break_interval_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/main.c")
add_executable(break_interval ${break_interval_SOURCES})
add_compile_options(
-Wall -Wextra -Wpedantic -Wno-missing-braces
$<$<COMPILE_LANGUAGE:CXX>:-Weffc++>
$<$<CONFIG:DEBUG>:-Og>
)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug', none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()