add geode debug

This commit is contained in:
altalk23 2022-10-12 22:07:18 +03:00
parent a75bc1b612
commit f580eda0b0
2 changed files with 5 additions and 1 deletions
CMakeLists.txt
loader/include/Geode/loader

View file

@ -14,6 +14,10 @@ endif()
add_library(${PROJECT_NAME} INTERFACE)
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
target_compile_definitions(${PROJECT_NAME} INTERFACE -DGEODE_DEBUG)
endif()
# Rerun CMake on VERSION file change
set_target_properties(${PROJECT_NAME} PROPERTIES CMAKE_CONFIGURE_DEPENDS VERSION)

View file

@ -141,7 +141,7 @@ namespace geode {
template <typename ...Args>
void debug(Args... args) {
#ifndef NDEBUG
#ifdef GEODE_DEBUG
schedule(Severity::Debug, args...);
#endif
}