From 01e700af54ab13c864103822d1870e947d4ca13c Mon Sep 17 00:00:00 2001 From: VaclavT Date: Sat, 15 Jan 2022 13:08:54 +0100 Subject: [PATCH] release/debug info in -v --- CMakeLists.txt | 2 +- ml.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4a4fd0..aa177cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) # otool -lV build/ml | grep stack # set(CMAKE_CXX_FLAGS "-Wall -Wextra") -set(CMAKE_CXX_FLAGS_RELEASE "-O3") +set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") include_directories(/usr/local/opt/openssl/include ${CMAKE_SOURCE_DIR}/clib ${CMAKE_SOURCE_DIR}) diff --git a/ml.h b/ml.h index 63c4a9c..ed4ad7a 100644 --- a/ml.h +++ b/ml.h @@ -6,7 +6,11 @@ #include #include -const std::string VERSION = "ml 0.4 (" __DATE__ " " __TIME__ ")"; +#ifdef NDEBUG +const std::string VERSION = "ml 0.4 (" __DATE__ " " __TIME__ "), Release"; +#else +const std::string VERSION = "ml 0.4 (" __DATE__ " " __TIME__ "), Debug"; +#endif const std::string STDLIB_LOADER = R"(