Create project skeleton

This commit is contained in:
2024-12-25 18:08:50 +00:00
commit 21cf170b5a
8 changed files with 137 additions and 0 deletions

22
CMakeLists.txt Normal file
View File

@@ -0,0 +1,22 @@
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()