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(unittest_LINK_LIBS
0021     Qt::Test
0022     ${parley_LINK_LIBS}
0023     parley_LIB
0024 )
0025 
0026 set(parley_unittest_helpers
0027     parleyunittestutilities.cpp
0028 )
0029 
0030 macro(PARLEY_GUI_UNITTESTS)
0031    foreach(_testname ${ARGN})
0032      get_filename_component( _name ${_testname} NAME_WE )
0033      ecm_add_test( ${_testname} ${parley_unittest_helpers}
0034        LINK_LIBRARIES ${unittest_LINK_LIBS}
0035        TEST_NAME ${_name}
0036        GUI)
0037    endforeach()
0038 endmacro()
0039 
0040 macro(PARLEY_NON_GUI_UNITTESTS)
0041    foreach(_testname ${ARGN})
0042      get_filename_component( _name ${_testname} NAME_WE )
0043      ecm_add_test( ${_testname} ${parley_unittest_helpers}
0044        LINK_LIBRARIES ${unittest_LINK_LIBS}
0045        TEST_NAME ${_name}
0046        )
0047    endforeach()
0048 endmacro()
0049 
0050 
0051 include_directories( ${unittest_INCLUDE_DIRS})
0052 
0053 
0054 parley_non_gui_unittests(
0055     testentrytest.cpp
0056     sessionmanagerfixedtest.cpp
0057     translateshelltest.cpp
0058 )