IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c598c74a authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by Nikos Karastathis
Browse files

rename debug-build define "DEBUG" to "_C8_DEBUG_" to avoid clash with logging

parent bdedebf7
No related branches found
No related tags found
1 merge request!437Resolve "Examples need some polishing"
...@@ -24,7 +24,7 @@ set (CMAKE_CXX_FLAGS_COVERAGE "-g --coverage") ...@@ -24,7 +24,7 @@ set (CMAKE_CXX_FLAGS_COVERAGE "-g --coverage")
set (CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage") set (CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage")
set (CMAKE_SHARED_LINKER_FLAGS_COVERAGE "--coverage") set (CMAKE_SHARED_LINKER_FLAGS_COVERAGE "--coverage")
# set a flag to inform code that we are in debug mode # set a flag to inform code that we are in debug mode
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_C8_DEBUG_")
#+++++++++++++++++++++++++++++ #+++++++++++++++++++++++++++++
......
...@@ -254,7 +254,7 @@ namespace corsika { ...@@ -254,7 +254,7 @@ namespace corsika {
if (pre_opt.size()) { if (pre_opt.size()) {
x1 = pre_opt[0]; //*std::max_element(pre_opt.begin(), pre_opt.end()); x1 = pre_opt[0]; //*std::max_element(pre_opt.begin(), pre_opt.end());
#ifdef DEBUG #ifdef _C8_DEBUG_
for (long double test_v : pre_opt) { for (long double test_v : pre_opt) {
CORSIKA_LOG_TRACE("test,andre x={} f(x)={}", test_v, CORSIKA_LOG_TRACE("test,andre x={} f(x)={}", test_v,
cubic_function(test_v, a, b, c, d)); cubic_function(test_v, a, b, c, d));
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define SPDLOG_FUNCTION __PRETTY_FUNCTION__ #define SPDLOG_FUNCTION __PRETTY_FUNCTION__
// if this is a Debug build, include debug messages in objects // if this is a Debug build, include debug messages in objects
#ifdef DEBUG #ifdef _C8_DEBUG_
// trace is the highest level of logging (ALL messages will be printed) // trace is the highest level of logging (ALL messages will be printed)
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE
#else // otherwise, remove everything but "error" and worse messages #else // otherwise, remove everything but "error" and worse messages
......
...@@ -177,7 +177,7 @@ int main(int argc, char** argv) { ...@@ -177,7 +177,7 @@ int main(int argc, char** argv) {
} else if (loglevel == "debug") { } else if (loglevel == "debug") {
logging::set_level(logging::level::debug); logging::set_level(logging::level::debug);
} else if (loglevel == "trace") { } else if (loglevel == "trace") {
#ifndef DEBUG #ifndef _C8_DEBUG_
CORSIKA_LOG_ERROR("trace log level requires a Debug build."); CORSIKA_LOG_ERROR("trace log level requires a Debug build.");
return 1; return 1;
#endif #endif
......
...@@ -200,7 +200,7 @@ int main(int argc, char** argv) { ...@@ -200,7 +200,7 @@ int main(int argc, char** argv) {
} else if (loglevel == "debug") { } else if (loglevel == "debug") {
logging::set_level(logging::level::debug); logging::set_level(logging::level::debug);
} else if (loglevel == "trace") { } else if (loglevel == "trace") {
#ifndef DEBUG #ifndef _C8_DEBUG_
CORSIKA_LOG_ERROR("trace log level requires a Debug build."); CORSIKA_LOG_ERROR("trace log level requires a Debug build.");
return 1; return 1;
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment