ShlubluLib  v0.5
ShlubluLib is a lightweight, modular, general purpose, open-source C++ library for Linux and Windows.
Debug.h
Go to the documentation of this file.
1 #pragma once
2 
75 #define __stringize(x) #x
77 
79 #ifdef _WIN32
80 #define __makestring(M, L) M(L)
81 #define __LINESTRING__ __makestring(__stringize, __LINE__)
82 #define PRAGMA_TOKENSTR(t) __FILE__ "(" __LINESTRING__ ") : " t ": "
83 
84 #define SHLUBLU_TODO(msg ) __pragma(message (PRAGMA_TOKENSTR("TODO") msg))
85 #define SHLUBLU_DEBUG(msg) __pragma(message (PRAGMA_TOKENSTR("DEBUG") msg))
86 
87 // Macros that turn optimizations on or off
88 #ifndef _WIN64
89 #define __OPTIMIZATION_LIST "gsty"
90 #else
91 #define __OPTIMIZATION_LIST "gst"
92 #endif
93 
94 #define SHLUBLU_OPTIMIZE_OFF() __pragma (optimize( __OPTIMIZATION_LIST, off )) \
95  SHLUBLU_DEBUG("All optimizations disabled")
96 
97 #else
98 #define SHLUBLU_TODO(msg) _Pragma (__stringize(message "TODO: " msg))
99 #define SHLUBLU_DEBUG(msg) _Pragma (__stringize(message "DEBUG: " msg))
100 
101 #define SHLUBLU_OPTIMIZE_OFF() _Pragma (__stringize(GCC warning "SHLUBLU_OPTIMIZE_OFF() has no effect with this platform."))
102 #endif
103 
104 
105