Fix debug build and remove platform detection wizardry in presets

they don't work
This commit is contained in:
tamasmeszaros 2023-10-27 15:59:15 +02:00
parent dc4ad2543c
commit 96c1a69aae
2 changed files with 4 additions and 35 deletions

8
deps/CMakeLists.txt vendored
View File

@ -45,7 +45,7 @@ endif ()
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/modules)
if (MSVC)
option(DEP_DEBUG "Build in debug version of packages automatically" OFF)
option(DEP_DEBUG "Build in debug version of packages automatically" ON)
endif ()
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
@ -259,7 +259,7 @@ if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-DCMAKE_DEBUG_POSTFIX=d
#TODO: forward per-package selector variables
-DDEP_MESSAGES_WRITTEN=ON
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_d
OUTPUT_QUIET
)
@ -270,7 +270,7 @@ if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
foreach(pkgtgt ${_build_list_filt})
add_custom_target(${pkgtgt}_debug
COMMAND ${CMAKE_COMMAND} --build . --target ${pkgtgt}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_d
USES_TERMINAL
)
endforeach()
@ -279,7 +279,7 @@ if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
string(JOIN " " _build_list_filt_targets "${_build_list_filt}")
add_custom_target(deps_debug ALL
COMMAND ${CMAKE_COMMAND} --build . --target ${_build_list_filt_targets}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_d
USES_TERMINAL
)

View File

@ -1,42 +1,11 @@
{
"version": 3,
"configurePresets": [
{
"name": "linux-only",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "windows-only",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"DEP_DEBUG": true
}
},
{
"name": "mac-only",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "default",
"displayName": "Default Config",
"description": "Default build for any desktop OS",
"binaryDir": "${sourceDir}/build-default",
"inherits": ["mac-only", "windows-only", "linux-only"],
"condition": {
"type": "const",
"value": true