CMakePresets.json
This commit is contained in:
@@ -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
@@ -1,5 +1,7 @@
|
|||||||
add_executable(zbbs-client-tui)
|
add_executable(zbbs-client-tui)
|
||||||
|
|
||||||
|
set_property(TARGET zbbs-client-tui PROPERTY C_STANDARD 23)
|
||||||
|
|
||||||
file(GLOB M_HEADERS "*.h")
|
file(GLOB M_HEADERS "*.h")
|
||||||
file(GLOB M_SOURCES "*.c")
|
file(GLOB M_SOURCES "*.c")
|
||||||
|
|
||||||
@@ -26,4 +28,22 @@ target_link_libraries(zbbs-client-tui
|
|||||||
widget
|
widget
|
||||||
modals
|
modals
|
||||||
${CURSES_LIBRARIES}
|
${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()
|
||||||
Reference in New Issue
Block a user