Warning, /frameworks/kcrash/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 remove_definitions(-DQT_NO_CAST_FROM_ASCII) 0002 0003 include(ECMAddTests) 0004 0005 find_package(Qt${QT_MAJOR_VERSION}Widgets ${REQUIRED_QT_VERSION} CONFIG QUIET) 0006 0007 if(NOT TARGET Qt${QT_MAJOR_VERSION}::Test) 0008 message(STATUS "Qt${QT_MAJOR_VERSION}Test not found, autotests will not be built.") 0009 return() 0010 endif() 0011 0012 if(NOT Qt${QT_MAJOR_VERSION}Widgets_FOUND) 0013 message(STATUS "Qt${QT_MAJOR_VERSION}Widgets not found, autotests will not be built.") 0014 return() 0015 endif() 0016 0017 # Include src so we have access to config-kcrash.h 0018 include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src) 0019 0020 # crash_tester enter an infinite loop on Windows (one step from a fork bomb) 0021 # and holds up the CI system infinitely. Disable it in absence of a fix. 0022 if(NOT WIN32) 0023 ecm_add_tests( 0024 kcrashtest.cpp 0025 LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Test 0026 ) 0027 0028 add_executable(test_crasher test_crasher.cpp) 0029 target_link_libraries(test_crasher Qt${QT_MAJOR_VERSION}::Widgets KF5::Crash) 0030 ecm_mark_as_test(test_crasher) 0031 ecm_mark_nongui_executable(test_crasher) 0032 0033 add_dependencies(kcrashtest test_crasher) 0034 endif() 0035 0036 ecm_add_tests( 0037 coreconfigtest.cpp 0038 LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Test 0039 ) 0040 0041 ecm_add_tests( 0042 metadatatest.cpp 0043 LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Test 0044 )