4 set(KDIS_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
6 ${KDIS_TESTS_DIR}/ConversionTests.cpp
7 ${KDIS_TESTS_DIR}/DataType_EncodeDecode5.cpp
8 ${KDIS_TESTS_DIR}/DataType_EncodeDecode6.cpp
9 ${KDIS_TESTS_DIR}/DataType_EncodeDecode7.cpp
10 ${KDIS_TESTS_DIR}/PDU_EncodeDecode5.cpp
11 ${KDIS_TESTS_DIR}/PDU_EncodeDecode6.cpp
12 ${KDIS_TESTS_DIR}/PDU_EncodeDecode7.cpp
13 ${KDIS_TESTS_DIR}/PDU_Factory.cpp
14 ${KDIS_TESTS_DIR}/PDU_FactoryDecoder5.cpp
15 ${KDIS_TESTS_DIR}/PDU_ProtocolFamily5.cpp
16 ${KDIS_TESTS_DIR}/PDU_ProtocolFamily6.cpp
17 ${KDIS_TESTS_DIR}/PDU_ProtocolFamily7.cpp
25 GITHUB_REPOSITORY google/googletest
29 OPTIONS "INSTALL_GTEST OFF" "gtest_force_shared_crt ON"
37 add_executable(${PROJECT_NAME}_tests ${KDIS_TESTS_SOURCES})
38 target_link_libraries(${PROJECT_NAME}_tests PRIVATE GTest::gtest_main KDIS::KDIS)
39 target_compile_definitions(
40 ${PROJECT_NAME}_tests PRIVATE DIS_VERSION=${DIS_VERSION}
41 $<$<BOOL:${KDIS_USE_ENUM_DESCRIPTORS}>:KDIS_USE_ENUM_DESCRIPTORS>
43 # TODO target_compile_options(${PROJECT_NAME}_tests PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
44 # $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Werror> )
45 gtest_discover_tests(${PROJECT_NAME}_tests)