2022-02-07 17:35:25 +01:00
|
|
|
qt_wrap_cpp(test-cppchecklibrarydata_SRC testcppchecklibrarydata.h)
|
2023-01-27 19:43:08 +01:00
|
|
|
QT_ADD_RESOURCES(test-cppchecklibrarydata_resources "resources.qrc")
|
|
|
|
add_custom_target(build-cppchecklibrarydata-deps SOURCES ${test-cppchecklibrarydata_SRC} ${test-cppchecklibrarydata_resources})
|
2021-12-17 21:49:32 +01:00
|
|
|
add_dependencies(gui-build-deps build-cppchecklibrarydata-deps)
|
|
|
|
add_executable(test-cppchecklibrarydata
|
|
|
|
${test-cppchecklibrarydata_SRC}
|
2023-01-27 19:43:08 +01:00
|
|
|
${test-cppchecklibrarydata_resources}
|
2021-12-17 21:49:32 +01:00
|
|
|
testcppchecklibrarydata.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/gui/cppchecklibrarydata.cpp
|
|
|
|
)
|
2023-09-11 11:34:22 +02:00
|
|
|
target_include_directories(test-cppchecklibrarydata PRIVATE ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/gui)
|
2023-01-27 19:43:08 +01:00
|
|
|
target_compile_definitions(test-cppchecklibrarydata PRIVATE SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
2022-03-13 20:07:58 +01:00
|
|
|
target_link_libraries(test-cppchecklibrarydata ${QT_CORE_LIB} ${QT_TEST_LIB})
|
|
|
|
|
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
# Q_UNUSED() in generated code
|
|
|
|
target_compile_options_safe(test-cppchecklibrarydata -Wno-extra-semi-stmt)
|
2023-01-27 19:43:08 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (REGISTER_GUI_TESTS)
|
|
|
|
add_test(NAME test-cppchecklibrarydata COMMAND $<TARGET_FILE:test-cppchecklibrarydata>)
|
2022-03-13 20:07:58 +01:00
|
|
|
endif()
|