diff --git a/ChangeLog b/ChangeLog index 56a4ab2b6..fad00b7aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -96,6 +96,7 @@ - Regular expressions are now enabled by default. - New verbosity token 'filter' shows the complete filter used by the last command. +- Display debug/release build type in the diagnostics command. ------ current release --------------------------- diff --git a/cmake.h.in b/cmake.h.in index 7bd25a6b5..315ee5465 100644 --- a/cmake.h.in +++ b/cmake.h.in @@ -12,6 +12,8 @@ #define PACKAGE_VERSION "${PACKAGE_VERSION}" #define PACKAGE_STRING "${PACKAGE_STRING}" +#define CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" + /* Installation details */ #define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}" diff --git a/src/commands/CmdDiagnostics.cpp b/src/commands/CmdDiagnostics.cpp index fa48b97d8..d371cb50e 100644 --- a/src/commands/CmdDiagnostics.cpp +++ b/src/commands/CmdDiagnostics.cpp @@ -174,6 +174,14 @@ int CmdDiagnostics::execute (std::string& output) #endif #else << "n/a" +#endif + << "\n"; + + out << " Build type: " +#ifdef CMAKE_BUILD_TYPE + << CMAKE_BUILD_TYPE +#else + << "-" #endif << "\n\n";