Warning, /games/kpat/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include(ECMAddTests)
0002 remove_definitions(
0003 -DQT_NO_CAST_FROM_ASCII
0004 )
0005 include_directories(
0006 AFTER
0007 ${CMAKE_SOURCE_DIR}/src
0008 ${CMAKE_BINARY_DIR}/src
0009 )
0010 ecm_add_test(
0011 shuffle_test.cpp
0012 TEST_NAME ShuffleTest
0013 LINK_LIBRARIES Qt6::Test
0014 NAME_PREFIX "kpat-"
0015 )
0016 ecm_add_test(
0017 freecell_solver.cpp
0018 TEST_NAME FcSolveTest
0019 LINK_LIBRARIES Qt6::Test
0020 NAME_PREFIX "kpat-"
0021 )
0022
0023 ecm_add_test(
0024 solve_by_name.cpp
0025 TEST_NAME SolveByVariantName
0026 LINK_LIBRARIES Qt6::Test
0027 NAME_PREFIX "kpat-"
0028 )
0029
0030 ecm_qt_declare_logging_category(SolverFormatTest_LOG_SRCS
0031 HEADER kpat_debug.h
0032 IDENTIFIER KPAT_LOG
0033 CATEGORY_NAME org.kde.kpat
0034 )
0035
0036 if (WITH_BH_SOLVER)
0037 ecm_add_test(
0038 golf_solver_wins.cpp
0039 TEST_NAME GolfSolveTest
0040 LINK_LIBRARIES Qt6::Test
0041 NAME_PREFIX "kpat-"
0042 )
0043
0044 ecm_add_test(
0045 "${CMAKE_SOURCE_DIR}/src/dealer.cpp"
0046 "${CMAKE_SOURCE_DIR}/src/dealerinfo.cpp"
0047 "${CMAKE_SOURCE_DIR}/src/golf.cpp"
0048 "${CMAKE_SOURCE_DIR}/src/patsolve/golfsolver.cpp"
0049 "${CMAKE_SOURCE_DIR}/src/patsolve/memory.cpp"
0050 "${CMAKE_SOURCE_DIR}/src/patsolve/patsolve.cpp"
0051 "${CMAKE_SOURCE_DIR}/src/messagebox.cpp"
0052 "${CMAKE_SOURCE_DIR}/src/patpile.cpp"
0053 "${CMAKE_SOURCE_DIR}/src/pileutils.cpp"
0054 "${CMAKE_SOURCE_DIR}/src/renderer.cpp"
0055 ${SolverFormatTest_LOG_SRCS}
0056 "settings_for_tests.cpp"
0057 solver_format.cpp
0058 TEST_NAME SolverFormatTest
0059 LINK_LIBRARIES
0060 Qt6::Test
0061 kcardgame
0062 KDEGames6
0063 KF6::I18n
0064 BlackHoleSolver::BlackHoleSolver
0065 NAME_PREFIX "kpat-"
0066 )
0067 # kpat code may include generated files, so by using any kpat file in the test
0068 # the test itself becomes dependent on the entire kpat target, even when not
0069 # using the target directly.
0070 # TODO: make libkpat a static library linked into the test and kpat itself so
0071 # the dependency order is "correct" and the compilation units are only built
0072 # once.
0073 add_dependencies(SolverFormatTest kpat)
0074
0075 endif()