This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 5bdd4f16bc Define DEBUG and _DEBUG in CMake Debug mode (#9933)
5bdd4f16bc is described below
commit 5bdd4f16bcbe89ac1f38dea65c6d6994ffb29166
Author: JosiahWI <[email protected]>
AuthorDate: Thu Jun 29 17:04:22 2023 -0500
Define DEBUG and _DEBUG in CMake Debug mode (#9933)
Our debug asserts weren't working because these debug symbols
weren't defined when using a Debug configuration.
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84b295d6b1..ab7a4d7d1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ add_compile_definitions(DEBUG _DEBUG)
+endif()
+
# ATS uses "unix" for variable names. Make sure its not defined
remove_definitions(-Dunix)