From 47fe8bb9b110f28b6750b827a199b2980fda0f21 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Sep 2023 23:59:14 +0100 Subject: [PATCH] Move SRB2_CONFIG_DEV_BUILD and SRB2_CONFIG_TESTERS to the root directory CMakeLists.txt Repairs the pre-CMake functionality of TESTERS builds having the format `ringracers_branch-name_TESTERS.exe` --- CMakeLists.txt | 7 +++++++ src/CMakeLists.txt | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cfef6281..d1db16412 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,9 @@ option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON) option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF) option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF) option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF) +option(SRB2_CONFIG_DEV_BUILD "Compile a development build." OFF) +option(SRB2_CONFIG_TESTERS "Compile a build for testers." OFF) +# SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting. option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF) option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF) option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF) @@ -202,6 +205,10 @@ if("${SRB2_SDL2_EXE_NAME}" STREQUAL "") if(NOT "${SRB2_GIT_REVISION}" STREQUAL "master") list(APPEND EXE_NAME_PARTS ${SRB2_GIT_REVISION}) endif() + + if (SRB2_CONFIG_TESTERS) + list(APPEND EXE_NAME_PARTS "TESTERS") + endif() else() list(APPEND EXE_NAME_PARTS ${SRB2_SDL2_EXE_NAME}) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e4b222fe9..b7cce51f6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -205,10 +205,6 @@ set(SRB2_CONFIG_USEASM OFF CACHE BOOL "Enable NASM tmap implementation for software mode speedup.") set(SRB2_CONFIG_YASM OFF CACHE BOOL "Use YASM in place of NASM.") -set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL - "Compile a development build of Dr Robotnik's Ring Racers.") -set(SRB2_CONFIG_TESTERS OFF CACHE BOOL - "Compile a build for testers.") add_subdirectory(blua)