diff options
Diffstat (limited to 'lib/configuration/CMakeLists.txt')
-rw-r--r-- | lib/configuration/CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/configuration/CMakeLists.txt b/lib/configuration/CMakeLists.txt new file mode 100644 index 0000000..6484a70 --- /dev/null +++ b/lib/configuration/CMakeLists.txt @@ -0,0 +1,24 @@ +add_library(configuration STATIC configuration.cpp qt_specialization.cpp) +target_link_libraries(configuration PUBLIC Qt5::Widgets) +target_include_directories(configuration INTERFACE .) + +add_executable(conf_parser test/main.cpp) +target_compile_definitions(conf_parser PRIVATE NO_QT_SPEC) +target_sanitize(conf_parser) +target_link_libraries(conf_parser PRIVATE configuration Catch2::Catch2) + +add_executable(conf_parser_qt test/qt.cpp) +target_link_libraries(conf_parser_qt PRIVATE configuration Catch2::Catch2) + +add_test(NAME conf_parser COMMAND conf_parser + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") +add_test(NAME conf_parser_qt COMMAND conf_parser_qt -platform offscreen + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") +set_tests_properties(conf_parser PROPERTIES ENVIRONMENT "CONFIGFILE=${CMAKE_CURRENT_SOURCE_DIR}/test/defaultrc.ini") +set_tests_properties(conf_parser_qt PROPERTIES ENVIRONMENT "CONFIGFILE=${CMAKE_CURRENT_SOURCE_DIR}/test/defaultrc.ini") + +if(${CMAKE_CXX_COMPILER_ID} MATCHES Clang) + add_executable(conf_fuzzer configuration.cpp) + target_compile_definitions(conf_fuzzer PRIVATE FUZZER NO_QT_SPEC) + target_sanitize_fuzzer(conf_fuzzer) +endif() |