Skip to content
Snippets Groups Projects
Commit 54172331 authored by Martin Beseda's avatar Martin Beseda
Browse files

NEW: Added message.h with message macros MSG_INFO and MSG_DEBUG intended to...

NEW: Added message.h with message macros MSG_INFO and MSG_DEBUG intended to unify and simplify library output.
parent bf80af08
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
project(lib4neuro) project(lib4neuro)
#TODO request newer version of CMake >=3.12
#TODO rewrite to use add_compile_definitions
if(WIN32) if(WIN32)
ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB") add_compile_options("-DBOOST_ALL_NO_LIB")
else() else()
ADD_DEFINITIONS("-DBOOST_TEST_DYN_LINK") add_compile_options("-DBOOST_TEST_DYN_LINK")
endif() endif()
#------------# #------------#
...@@ -12,9 +15,12 @@ endif() ...@@ -12,9 +15,12 @@ endif()
#------------# #------------#
# Release / None / Debug # Release / None / Debug
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
"Choose the type of build, options are: None Debug Release." "Choose the type of build, options are: None Debug Release."
FORCE) FORCE)
elseif("CMAKE_BUILD_TYPE" STREQUAL "Debug")
#TODO rewrite to use add_compile_definitions
add_compile_options(-DDEBUG)
endif (NOT CMAKE_BUILD_TYPE) endif (NOT CMAKE_BUILD_TYPE)
#------------------------# #------------------------#
......
Subproject commit 7142eb200291e29c11a448c58c2c1031664aa69b Subproject commit 65b96e76f6c51b5492bc5ef2d0d67aad8d6ae801
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "../src/Solvers/DESolver.h" #include "../src/Solvers/DESolver.h"
#include "../src/constants.h" #include "../src/constants.h"
#include "../src/settings.h" #include "../src/settings.h"
#include "../src/message.h"
#endif //INC_4NEURO_4NEURO_H #endif //INC_4NEURO_4NEURO_H
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
int main(int argc, char** argv){ int main(int argc, char** argv){
MSG_INFO("INFO MESSAGE!");
MSG_DEBUG("DEBUG MESSAGE");
return 0; return 0;
} }
//
// Created by martin on 9/8/18.
//
#ifndef PROJECT_MESSAGE_H
#define PROJECT_MESSAGE_H
#define MSG_INFO(str) {\
std::cout << "INFO: " << str << std::endl;\
}
#ifdef DEBUG
#define MSG_DEBUG(str) {\
std::cout << "DEBUG: " << str << std::endl;\
}
#else
#define MSG_DEBUG(str)
#endif
#endif //PROJECT_MESSAGE_H
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