[cmake] use DEFAULT_DEBUG_OPTION for all

This commit is contained in:
akallabeth 2024-02-13 16:52:51 +01:00 committed by akallabeth
parent 83b8acf897
commit e2e6d09256
5 changed files with 12 additions and 8 deletions

View File

@ -21,7 +21,7 @@ include_directories(common)
add_subdirectory(common) add_subdirectory(common)
if(WITH_CLIENT_CHANNELS) if(WITH_CLIENT_CHANNELS)
option(WITH_DEBUG_URBDRC "Dump data send/received in URBDRC channel" OFF) option(WITH_DEBUG_URBDRC "Dump data send/received in URBDRC channel" ${DEFAULT_DEBUG_OPTION})
find_package(libusb-1.0 REQUIRED) find_package(libusb-1.0 REQUIRED)
include_directories(${LIBUSB_1_INCLUDE_DIRS}) include_directories(${LIBUSB_1_INCLUDE_DIRS})

View File

@ -40,8 +40,8 @@ include(CommonConfigOptions)
include(ConfigureFreeRDP) include(ConfigureFreeRDP)
option(WITH_DEBUG_SDL_EVENTS "[dangerous, not for release builds!] Debug SDL events" OFF) option(WITH_DEBUG_SDL_EVENTS "[dangerous, not for release builds!] Debug SDL events" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_SDL_KBD_EVENTS "[dangerous, not for release builds!] Debug SDL keyboard events" OFF) option(WITH_DEBUG_SDL_KBD_EVENTS "[dangerous, not for release builds!] Debug SDL keyboard events" ${DEFAULT_DEBUG_OPTION})
option(WITH_WIN_CONSOLE "Build ${PROJECT_NAME} with console support" ON) option(WITH_WIN_CONSOLE "Build ${PROJECT_NAME} with console support" ON)
option(WITH_SDL_LINK_SHARED "link SDL dynamic or static" ON) option(WITH_SDL_LINK_SHARED "link SDL dynamic or static" ON)

View File

@ -86,9 +86,9 @@ option(WITH_DEBUG_ALL "Print all debug messages." OFF)
if(WITH_DEBUG_ALL) if(WITH_DEBUG_ALL)
message(WARNING "WITH_DEBUG_ALL=ON, the build will be slow and might leak sensitive information, do not use with release builds!") message(WARNING "WITH_DEBUG_ALL=ON, the build will be slow and might leak sensitive information, do not use with release builds!")
set(DEFAULT_DEBUG_OPTION "ON") set(DEFAULT_DEBUG_OPTION ON CACHE INTERNAL "debug default")
else() else()
set(DEFAULT_DEBUG_OPTION "OFF") set(DEFAULT_DEBUG_OPTION OFF CACHE INTERNAL "debug default")
endif() endif()
option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." ${DEFAULT_DEBUG_OPTION}) option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." ${DEFAULT_DEBUG_OPTION})

View File

@ -47,10 +47,14 @@ if (NOT FREERDP_UNIFIED_BUILD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif() endif()
endif() endif()
if(WITH_DEBUG_ALL)
message(WARNING "WITH_DEBUG_ALL=ON, the build will be slow and might leak sensitive information, do not use with release builds!")
set(DEFAULT_DEBUG_OPTION "ON" CACHE INTERNAL "debug default")
else()
set(DEFAULT_DEBUG_OPTION "OFF" CACHE INTERNAL "debug default")
endif()
endif() endif()
set(DEFAULT_DEBUG_OPTION OFF)
if (WIN32 AND NOT UWP) if (WIN32 AND NOT UWP)
set(NATIVE_SSPI ON) set(NATIVE_SSPI ON)
endif() endif()

View File

@ -60,7 +60,7 @@ if (NOT WIN32 AND NOT ANDROID AND NOT IOS AND NOT APPLE)
set(KRB5_DEFAULT ON) set(KRB5_DEFAULT ON)
endif() endif()
option(WITH_DEBUG_SCHANNEL "Compile support for SCHANNEL debug" OFF) option(WITH_DEBUG_SCHANNEL "Compile support for SCHANNEL debug" ${DEFAULT_DEBUG_OPTION})
if (WITH_DEBUG_SCHANNEL) if (WITH_DEBUG_SCHANNEL)
winpr_definition_add("-DWITH_DEBUG_SCHANNEL") winpr_definition_add("-DWITH_DEBUG_SCHANNEL")
endif() endif()