summaryrefslogtreecommitdiffstats
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:22 +0000
commit6a7eecec57783a042d12f895d5ae148c44f4d074 (patch)
tree77a2c3c5612655f1dd15e9a2ddf14e13bab90b1f /tests/CMakeLists.txt
parentReleasing progress-linux version 1.59.0-1~progress7.99u1. (diff)
downloadnghttp2-6a7eecec57783a042d12f895d5ae148c44f4d074.tar.xz
nghttp2-6a7eecec57783a042d12f895d5ae148c44f4d074.zip
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt89
1 files changed, 43 insertions, 46 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b20ccf7..852cb10 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,55 +1,52 @@
# XXX testdata/: EXTRA_DIST = cacert.pem index.html privkey.pem
-if(HAVE_CUNIT)
- string(REPLACE " " ";" c_flags "${WARNCFLAGS}")
- add_compile_options(${c_flags})
+string(REPLACE " " ";" c_flags "${WARNCFLAGS}")
+add_compile_options(${c_flags})
- include_directories(
- "${CMAKE_SOURCE_DIR}/lib/includes"
- "${CMAKE_SOURCE_DIR}/lib"
- "${CMAKE_BINARY_DIR}/lib/includes"
- ${CUNIT_INCLUDE_DIRS}
- )
+include_directories(
+ "${CMAKE_SOURCE_DIR}/lib/includes"
+ "${CMAKE_SOURCE_DIR}/lib"
+ "${CMAKE_SOURCE_DIR}/tests/munit"
+ "${CMAKE_BINARY_DIR}/lib/includes"
+)
+
+set(MAIN_SOURCES
+ main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c
+ nghttp2_test_helper.c
+ nghttp2_frame_test.c
+ nghttp2_stream_test.c
+ nghttp2_session_test.c
+ nghttp2_hd_test.c
+ nghttp2_alpn_test.c
+ nghttp2_helper_test.c
+ nghttp2_buf_test.c
+ nghttp2_http_test.c
+ nghttp2_extpri_test.c
+ nghttp2_ratelim_test.c
+ munit/munit.c
+)
+
+add_executable(main EXCLUDE_FROM_ALL
+ ${MAIN_SOURCES}
+)
+target_link_libraries(main
+ nghttp2_static
+)
+add_test(main main)
+add_dependencies(check main)
- set(MAIN_SOURCES
- main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c
+if(ENABLE_FAILMALLOC)
+ set(FAILMALLOC_SOURCES
+ failmalloc.c failmalloc_test.c
+ malloc_wrapper.c
nghttp2_test_helper.c
- nghttp2_frame_test.c
- nghttp2_stream_test.c
- nghttp2_session_test.c
- nghttp2_hd_test.c
- nghttp2_alpn_test.c
- nghttp2_helper_test.c
- nghttp2_buf_test.c
- nghttp2_http_test.c
- nghttp2_extpri_test.c
- nghttp2_ratelim_test.c
+ munit/munit.c
)
-
- add_executable(main EXCLUDE_FROM_ALL
- ${MAIN_SOURCES}
+ add_executable(failmalloc EXCLUDE_FROM_ALL
+ ${FAILMALLOC_SOURCES}
)
- target_include_directories(main PRIVATE ${CUNIT_INCLUDE_DIRS})
- target_link_libraries(main
+ target_link_libraries(failmalloc
nghttp2_static
- ${CUNIT_LIBRARIES}
)
- add_test(main main)
- add_dependencies(check main)
-
- if(ENABLE_FAILMALLOC)
- set(FAILMALLOC_SOURCES
- failmalloc.c failmalloc_test.c
- malloc_wrapper.c
- nghttp2_test_helper.c
- )
- add_executable(failmalloc EXCLUDE_FROM_ALL
- ${FAILMALLOC_SOURCES}
- )
- target_link_libraries(failmalloc
- nghttp2_static
- ${CUNIT_LIBRARIES}
- )
- add_test(failmalloc failmalloc)
- add_dependencies(check failmalloc)
- endif()
+ add_test(failmalloc failmalloc)
+ add_dependencies(check failmalloc)
endif()