build: add maintainer build option
All checks were successful
Source release / source-package (push) Successful in 50s

Add a shared MAINTAINER_BUILD CMake option for maintainer-only helpers
and diagnostics.

The option is disabled by default and is intended for development and
compatibility testing only. When enabled, it defines MAINTAINER_BUILD for
the build so server-side diagnostic code can be guarded behind the same
switch used by the DOS tools submodule.

This keeps extra NCP tracing and test-only support out of normal builds
while allowing both mars_nwe and dostools to use one common maintainer
mode.
This commit is contained in:
Mario Fetka
2026-05-27 18:00:24 +02:00
parent 7d96d0b253
commit 9aa71115b7

View File

@@ -63,6 +63,7 @@ INCLUDE(${CMAKE_MODULE_PATH}/MarsNweInstallDirs.cmake)
option(ENABLE_DEBUG "Compile in MARS NWE debug logging code (DO_DEBUG)" OFF)
option(ENABLE_DEBUG_BUILD "Build with debug compiler flags (-g3 -O0 -fno-omit-frame-pointer)" OFF)
option(ENABLE_DEBUG_DOSUTILS "Enable NCP 17/02 debugging support for mars_dosutils" OFF)
option(MAINTAINER_BUILD "Enable maintainer-only test helpers and diagnostics" OFF)
option(ENABLE_INTERNAL_RIP_SAP "Should we build Mars Nwe with Internal Router?" ON)
option(ENABLE_SHADOW_PWD "Should we build Mars Nwe with Shadow Password Support?" ON)
option(ENABLE_QUOTA_SUPPORT "Should we build Mars Nwe with Quota Support?" ON)
@@ -90,6 +91,10 @@ if(ENABLE_DEBUG_BUILD)
)
endif()
if(MAINTAINER_BUILD)
add_compile_definitions(MAINTAINER_BUILD)
endif()
if(NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "RelWithDebInfo" "MinSizeRel")
@@ -191,6 +196,7 @@ message(STATUS "SMArT admin group: ${MARS_NWE_SMART_ADMIN_GROUP}")
message(STATUS "Install DOS utilities: ${MARS_NWE_INSTALL_DOSUTILS}")
message(STATUS "Install new DOS utilities: ${MARS_NWE_INSTALL_NEW_DOSUTILS}")
message(STATUS "Build DOS utilities: ${MARS_NWE_BUILD_DOSUTILS}")
message(STATUS "Maintainer build: ${MAINTAINER_BUILD}")
# put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources