aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-08-27 05:29:27 -0500
committerBrent Cook <busterb@gmail.com>2023-08-29 00:28:53 -0500
commite5f1938cc6479055ca3e59edc8d4dceed08bc000 (patch)
treeb6036b2543a440ff12e71e1602a3c195a904bd79 /tests
parent4c1f595d98dc228c7c4a1575d8a005c2ad8eb682 (diff)
downloadportable-e5f1938cc6479055ca3e59edc8d4dceed08bc000.tar.gz
portable-e5f1938cc6479055ca3e59edc8d4dceed08bc000.tar.bz2
portable-e5f1938cc6479055ca3e59edc8d4dceed08bc000.zip
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
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(
17 ../include/compat 17 ../include/compat
18) 18)
19 19
20# force 'Debug' build type for tests to not disable asserts
21set(CMAKE_BUILD_TYPE "Debug")
22
20add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") 23add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\")
21 24
22file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) 25file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR)