From b04dd43e3155b8aeab53e25f9f2e588a8730c355 Mon Sep 17 00:00:00 2001 From: Daniel Olson Date: Thu, 12 Sep 2024 20:07:38 -0600 Subject: [PATCH] If built without release optimizations, ULTRA will now note that in -h. --- CMakeLists.txt | 3 +++ src/cli.hpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6620c74..1b8e048 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,9 @@ if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) endif() +if(NOT CMAKE_BUILD_TYPE STREQUAL "Release") + add_definitions(-DDEBUG_PRAGMA=1) +endif() set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/src/cli.hpp b/src/cli.hpp index a4f6fe9..b98949d 100644 --- a/src/cli.hpp +++ b/src/cli.hpp @@ -6,6 +6,12 @@ #define ULTRA_CLI_HPP #define ULTRA_VERSION_STRING "1.0.2b" +#define DEBUG_STRING "" +#ifdef DEBUG_PRAGMA +#undef DEBUG_STRING +#define DEBUG_STRING " **WARNING** BUILT WITHOUT RELEASE OPTIMIZATION **WARNING** \n" +#endif + #include "../lib/CLI11.hpp" @@ -109,6 +115,7 @@ struct Settings { "(U)ltra (L)ocates (T)andemly (R)epetitive (A)reas\n" " Daniel R. Olson and Travis J. Wheeler\n" " Version " ULTRA_VERSION_STRING "\n" + DEBUG_STRING " Use '--cite' for citation instructions\n" "=================================================\n"};