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_BINARY_DIR}/lib/includes" 10 ${CUNIT_INCLUDE_DIRS} 11 ) 12 13 set(MAIN_SOURCES 14 main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c 15 nghttp2_test_helper.c 16 nghttp2_frame_test.c 17 nghttp2_stream_test.c 18 nghttp2_session_test.c 19 nghttp2_hd_test.c 20 nghttp2_npn_test.c 21 nghttp2_helper_test.c 22 nghttp2_buf_test.c 23 nghttp2_http_test.c 24 nghttp2_extpri_test.c 25 nghttp2_ratelim_test.c 26 ) 27 28 add_executable(main EXCLUDE_FROM_ALL 29 ${MAIN_SOURCES} 30 ) 31 target_include_directories(main PRIVATE ${CUNIT_INCLUDE_DIRS}) 32 target_link_libraries(main 33 nghttp2_static 34 ${CUNIT_LIBRARIES} 35 ) 36 add_test(main main) 37 add_dependencies(check main) 38 39 if(ENABLE_FAILMALLOC) 40 set(FAILMALLOC_SOURCES 41 failmalloc.c failmalloc_test.c 42 malloc_wrapper.c 43 nghttp2_test_helper.c 44 ) 45 add_executable(failmalloc EXCLUDE_FROM_ALL 46 ${FAILMALLOC_SOURCES} 47 ) 48 target_link_libraries(failmalloc 49 nghttp2_static 50 ${CUNIT_LIBRARIES} 51 ) 52 add_test(failmalloc failmalloc) 53 add_dependencies(check failmalloc) 54 endif() 55 56 if(ENABLE_APP) 57 # EXTRA_DIST = end_to_end.py 58 # TESTS += end_to_end.py 59 endif() 60endif() 61