Skip to content

Commit

Permalink
Enable debug output on linux (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSimek authored Jun 12, 2022
1 parent c0b98ba commit 8c2b9c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ if(WIN32)
_CRT_SECURE_NO_WARNINGS
_CRT_NONSTDC_NO_WARNINGS
)
else()
target_compile_definitions(${EXECUTABLE_NAME} PRIVATE
$<$<CONFIG:Debug>:_DEBUG>
$<$<CONFIG:RelWithDebInfo>:_DEBUG>
)
endif()

if(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion src/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int debugPrint(const char* format, ...)
#ifdef _WIN32
OutputDebugStringA(string);
#else
printf(string);
printf("%s", string);
#endif
#endif
rc = -1;
Expand Down

0 comments on commit 8c2b9c7

Please sign in to comment.