diff options
author | Brent Cook <busterb@gmail.com> | 2023-08-27 05:29:27 -0500 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2023-08-29 00:28:53 -0500 |
commit | e5f1938cc6479055ca3e59edc8d4dceed08bc000 (patch) | |
tree | b6036b2543a440ff12e71e1602a3c195a904bd79 /tests | |
parent | 4c1f595d98dc228c7c4a1575d8a005c2ad8eb682 (diff) | |
download | portable-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.txt | 3 |
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 | ||
21 | set(CMAKE_BUILD_TYPE "Debug") | ||
22 | |||
20 | add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") | 23 | add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") |
21 | 24 | ||
22 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) | 25 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) |