CMakePresets.json

This commit is contained in:
2026-02-09 18:03:40 +02:00
parent 3501085c4b
commit 8a45c6dbf9
2 changed files with 44 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
{
"version": 4,
"configurePresets": [
{
"name": "debug",
"displayName": "Debug",
"description": "Debug build",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"ZBBS_DEBUG": "ON"
}
},
{
"name": "release",
"displayName": "Release",
"description": "Release build",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"ZBBS_DEBUG": "OFF"
}
}
]
}
+21 -1
View File
@@ -1,5 +1,7 @@
add_executable(zbbs-client-tui)
set_property(TARGET zbbs-client-tui PROPERTY C_STANDARD 23)
file(GLOB M_HEADERS "*.h")
file(GLOB M_SOURCES "*.c")
@@ -26,4 +28,22 @@ target_link_libraries(zbbs-client-tui
widget
modals
${CURSES_LIBRARIES}
)
)
if (ZBBS_DEBUG)
if(
(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR
(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
)
target_compile_options(zbbs-client-tui PRIVATE /W3)
elseif(
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
)
target_compile_options(zbbs-client-tui PRIVATE -Wall -ggdb -pedantic)
endif()
endif()