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

View File

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