Warning, /education/parley/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include(ECMMarkAsTest)
0002 include(ECMAddTests)
0003 include(CTest)
0004
0005 find_package(Qt${QT_MAJOR_VERSION} 5.2.0 CONFIG REQUIRED Test)
0006
0007 # To add a new unittest
0008 # 1. Add its name to parley_gui_unit_tests or parley_non_gui_unit_tests
0009 # 2. Add any non-parley library helper cpp files to parley_unittest_helpers
0010
0011 # set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
0012
0013 include_directories(
0014 ../src
0015 ../src/practice
0016 ../src/editor
0017 ../src/collection
0018 )
0019
0020 set(parley_unittest_helpers
0021 parleyunittestutilities.cpp
0022 )
0023
0024 macro(PARLEY_GUI_UNITTESTS)
0025 foreach(_testname ${ARGN})
0026 get_filename_component( _name ${_testname} NAME_WE )
0027 ecm_add_test( ${_testname} ${parley_unittest_helpers}
0028 LINK_LIBRARIES
0029 parley_LIB
0030 Qt${QT_MAJOR_VERSION}::Test
0031 TEST_NAME ${_name}
0032 GUI)
0033 endforeach()
0034 endmacro()
0035
0036 macro(PARLEY_NON_GUI_UNITTESTS)
0037 foreach(_testname ${ARGN})
0038 get_filename_component( _name ${_testname} NAME_WE )
0039 ecm_add_test( ${_testname} ${parley_unittest_helpers}
0040 LINK_LIBRARIES
0041 parley_LIB
0042 Qt${QT_MAJOR_VERSION}::Test
0043 TEST_NAME ${_name}
0044 )
0045 endforeach()
0046 endmacro()
0047
0048 parley_non_gui_unittests(
0049 testentrytest.cpp
0050 sessionmanagerfixedtest.cpp
0051 translateshelltest.cpp
0052 )