mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Make sure the DEBUG flag is defined when building in debug mode
MSVC uses _DEBUG, unlike all of the other compilers, so we aren't properly enabling/disabling varying bits of code that are dependent on DEBUG being defined.
This commit is contained in:
parent
4cb77c1743
commit
1f0860b5e2
2 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,7 @@ if ( MSVC )
|
||||||
|
|
||||||
# Set always to static runtime
|
# Set always to static runtime
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /DDEBUG")
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY_FLAG "MTd")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY_FLAG "MTd")
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#ifdef ASSERT
|
||||||
|
#undef ASSERT
|
||||||
|
#endif
|
||||||
#define ASSERT(x) assert(x)
|
#define ASSERT(x) assert(x)
|
||||||
#define DEBUG_MSG(...) fprintf(stderr, __VA_ARGS__)
|
#define DEBUG_MSG(...) fprintf(stderr, __VA_ARGS__)
|
||||||
#define DEBUG_fputs fputs
|
#define DEBUG_fputs fputs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue