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