Change API macro names to be more consistent.

This commit is contained in:
rexy712 2022-06-22 13:42:07 -07:00
parent 24ef556ab7
commit 1bc234cbca
3 changed files with 14 additions and 16 deletions

View File

@ -45,10 +45,8 @@ else()
if(ENABLE_SSO) if(ENABLE_SSO)
set(librexy_ENABLE_SSO 1) set(librexy_ENABLE_SSO 1)
target_compile_options(rexy PRIVATE -DREXY_ENABLE_SSO=1)
else() else()
set(librexy_ENABLE_SSO 0) set(librexy_ENABLE_SSO 0)
target_compile_options(rexy PRIVATE -DREXY_ENABLE_SSO=0)
endif() endif()
if(ENABLE_PROFILING) if(ENABLE_PROFILING)
target_compile_options(rexy PRIVATE -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls) target_compile_options(rexy PRIVATE -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls)

View File

@ -22,15 +22,15 @@
#include "detail/debug_config.hpp" #include "detail/debug_config.hpp"
//Debug output section //Debug output section
#if REXY_ENABLE_DEBUG_LEVEL > 0 #if LIBREXY_ENABLE_DEBUG_LEVEL > 0
#define REXY_ENABLE_DEBUG_OUTPUT #define LIBREXY_ENABLE_DEBUG_OUTPUT
#endif #endif
#if REXY_ENABLE_DEBUG_LEVEL > 2 #if LIBREXY_ENABLE_DEBUG_LEVEL > 2
#define REXY_ENABLE_DEBUG_VERBOSE_OUTPUT #define LIBREXY_ENABLE_DEBUG_VERBOSE_OUTPUT
#endif #endif
#ifdef REXY_ENABLE_DEBUG_OUTPUT #ifdef LIBREXY_ENABLE_DEBUG_OUTPUT
#include <cstdio> //fprintf, vfprintf #include <cstdio> //fprintf, vfprintf
#include <utility> //forward #include <utility> //forward
@ -58,7 +58,7 @@
}; };
template<class... Args> template<class... Args>
print(Args&&...) -> print<Args&&...>; print(Args&&...) -> print<Args&&...>;
#ifdef REXY_ENABLE_COLOR_DEBUG #ifdef LIBREXY_ENABLE_COLOR_DEBUG
template<class... Args> template<class... Args>
struct print_succ{ struct print_succ{
explicit print_succ(Args&&... args, const rexy::compat::source_location& loc = rexy::compat::source_location::current()){ explicit print_succ(Args&&... args, const rexy::compat::source_location& loc = rexy::compat::source_location::current()){
@ -132,7 +132,7 @@
public: public:
using print<Args...>::print; using print<Args...>::print;
}; };
#endif //REXY_ENABLE_COLOR_DEBUG #endif //LIBREXY_ENABLE_COLOR_DEBUG
template<class... Args> template<class... Args>
print_warn(Args&&...) -> print_warn<Args&&...>; print_warn(Args&&...) -> print_warn<Args&&...>;
template<class... Args> template<class... Args>
@ -142,7 +142,7 @@
template<class... Args> template<class... Args>
print_succ(Args&&...) -> print_succ<Args&&...>; print_succ(Args&&...) -> print_succ<Args&&...>;
#ifdef REXY_ENABLE_DEBUG_VERBOSE_OUTPUT #ifdef LIBREXY_ENABLE_DEBUG_VERBOSE_OUTPUT
namespace verbose{ namespace verbose{
template<class... Args> template<class... Args>
class print : public ::rexy::debug::print<Args...>{ class print : public ::rexy::debug::print<Args...>{
@ -190,7 +190,7 @@
static constexpr inline void print_warn(...){} static constexpr inline void print_warn(...){}
static constexpr inline void print_error(...){} static constexpr inline void print_error(...){}
} }
#endif //REXY_ENABLE_DEBUG_VERBOSE_OUTPUT #endif //LIBREXY_ENABLE_DEBUG_VERBOSE_OUTPUT
} }
#else #else
namespace rexy::debug{ namespace rexy::debug{
@ -207,6 +207,6 @@
static constexpr inline void print_error(...){} static constexpr inline void print_error(...){}
} }
} }
#endif //REXY_ENABLE_DEBUG_OUTPUT #endif //LIBREXY_ENABLE_DEBUG_OUTPUT
#endif #endif

View File

@ -17,10 +17,10 @@
*/ */
#ifndef REXY_ENABLE_DEBUG_LEVEL #ifndef LIBREXY_ENABLE_DEBUG_LEVEL
#define REXY_ENABLE_DEBUG_LEVEL 0 #define LIBREXY_ENABLE_DEBUG_LEVEL 0
#endif #endif
#ifndef REXY_ENABLE_COLOR_DEBUG #ifndef LIBREXY_ENABLE_COLOR_DEBUG
#define REXY_ENABLE_COLOR_DEBUG 1 #define LIBREXY_ENABLE_COLOR_DEBUG 1
#endif #endif