• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# XXX testdata/: EXTRA_DIST = cacert.pem  index.html  privkey.pem
2string(REPLACE " " ";" c_flags "${WARNCFLAGS}")
3add_compile_options(${c_flags})
4
5include_directories(
6  "${CMAKE_SOURCE_DIR}/lib/includes"
7  "${CMAKE_SOURCE_DIR}/lib"
8  "${CMAKE_SOURCE_DIR}/tests/munit"
9  "${CMAKE_BINARY_DIR}/lib/includes"
10)
11
12set(MAIN_SOURCES
13  main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c
14  nghttp2_test_helper.c
15  nghttp2_frame_test.c
16  nghttp2_stream_test.c
17  nghttp2_session_test.c
18  nghttp2_hd_test.c
19  nghttp2_alpn_test.c
20  nghttp2_helper_test.c
21  nghttp2_buf_test.c
22  nghttp2_http_test.c
23  nghttp2_extpri_test.c
24  nghttp2_ratelim_test.c
25  munit/munit.c
26)
27
28add_executable(main EXCLUDE_FROM_ALL
29  ${MAIN_SOURCES}
30)
31target_link_libraries(main
32  nghttp2_static
33)
34add_test(main main)
35add_dependencies(check main)
36
37if(ENABLE_FAILMALLOC)
38  set(FAILMALLOC_SOURCES
39    failmalloc.c failmalloc_test.c
40    malloc_wrapper.c
41    nghttp2_test_helper.c
42    munit/munit.c
43  )
44  add_executable(failmalloc EXCLUDE_FROM_ALL
45    ${FAILMALLOC_SOURCES}
46  )
47  target_link_libraries(failmalloc
48    nghttp2_static
49  )
50  add_test(failmalloc failmalloc)
51  add_dependencies(check failmalloc)
52endif()
53