retro-rpg/CMakeLists.txt

23 lines
568 B
CMake

cmake_minimum_required(VERSION 3.10)
project(epec-mcu-emulator LANGUAGES C)
option(TESTS "Build unit tests" ON)
option(WERROR "Treat warnings as errors" OFF)
macro(set_default_target_options target)
set_property(TARGET ${target} PROPERTY C_STANDARD 11)
set_property(TARGET ${target} PROPERTY C_EXTENSIONS OFF)
target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic)
if (${WERROR})
target_compile_options(${target} PRIVATE -Werror)
endif()
endmacro()
add_subdirectory(engine)
if (${TESTS})
enable_testing()
add_subdirectory(tests)
endif()