Add base presets
This commit is contained in:
parent
b427fbca68
commit
b47e962ce9
@ -1,14 +1,20 @@
|
||||
# project settings
|
||||
# General project settings
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(FloatPUMP VERSION 2.0.0 LANGUAGES C CXX ASM )
|
||||
project(FloatPUMP VERSION 2.0.0 LANGUAGES C CXX ASM)
|
||||
|
||||
# Custom options
|
||||
option(ENABLE_UNITTESTS "Activates the unittesting framework" OFF)
|
||||
|
||||
# General language considerations
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
# General Project
|
||||
add_subdirectory(floatpump)
|
||||
|
||||
# All UnitTest Related stuff
|
||||
add_subdirectory(Catch2)
|
||||
add_subdirectory(Tests)
|
||||
# Testing Project
|
||||
if(ENABLE_UNITTESTS)
|
||||
message(STATUS "Enabled Unit Tests")
|
||||
add_subirectory(Catch2)
|
||||
add_subdirectory(Tests)
|
||||
endif()
|
33
CMakePresets.json
Normal file
33
CMakePresets.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "debug@firmware",
|
||||
"description": "Firmware Debug Build",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "toolchain/arm-none-eabi-stm32f411ceu6-toolchain.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
},
|
||||
"binaryDir": "build/debug@firmware"
|
||||
},
|
||||
{
|
||||
"name": "debug@tests",
|
||||
"description": "UnitTests Debug Buil",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"ENABLE_UNITTESTS": "ON"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "build-debug@firmware",
|
||||
"description": "Builds the debugging firmware",
|
||||
"cleanFirst": false,
|
||||
"configuration": "debug@firmware",
|
||||
"targets": [
|
||||
"FloatPUMP.elf"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user