properly do debug
This commit is contained in:
parent
32919ca13d
commit
c45cf566c0
3 changed files with 12 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|||
target_link_libraries(GearSrc PRIVATE m)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
target_compile_definitions(GearSrc PRIVATE DEBUG)
|
||||
endif()
|
||||
|
||||
install_target(GearSrc)
|
||||
install(
|
||||
DIRECTORY include/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ void GSLog(int level, const char* fmt, ...) {
|
|||
va_list va;
|
||||
FILE* out = stdout;
|
||||
|
||||
#ifndef DEBUG
|
||||
if(level == GSLogDebug) return;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
fprintf(out, "[GearSrc|");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue