From e5f1938cc6479055ca3e59edc8d4dceed08bc000 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 27 Aug 2023 05:29:27 -0500 Subject: Fix build flags for tests The default C flags for all build types other than 'Debug' sets -DNDEBUG which disables assert(), and breaks tests. This switches tests to use 'Debug' instead, reenabling asserts. --- tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d09b9da..b43f406 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,6 +17,9 @@ include_directories( ../include/compat ) +# force 'Debug' build type for tests to not disable asserts +set(CMAKE_BUILD_TYPE "Debug") + add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) -- cgit v1.2.3-55-g6feb