From 9aa71115b7986ebd8c9a1e12da006e05e7bf3e64 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Wed, 27 May 2026 18:00:24 +0200 Subject: [PATCH] build: add maintainer build option 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. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 141dc96..352ed7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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