CMakeLists.txt 977 B

123456789101112131415161718192021222324252627282930313233
  1. set(KIT_TESTS ${CPP_TEST_PATH}/ctkSimplePythonShell)
  2. set(SCRIPTS
  3. wrappedQInvokableTest.py
  4. wrappedQPropertyTest.py
  5. wrappedSlotTest.py
  6. )
  7. # Since QTimer is part of QtCore and is used in both 'ctkWidgetsTest.py' and 'derivedQWidgetTest.py',
  8. # these two tests should be included only if CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE is ON
  9. if(CTK_LIB_Widgets AND CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE)
  10. list(APPEND SCRIPTS ctkWidgetsTest.py)
  11. endif()
  12. if(CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE AND CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTGUI)
  13. list(APPEND SCRIPTS derivedQWidgetTest.py)
  14. endif()
  15. if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
  16. list(APPEND SCRIPTS
  17. vtkPythonSmoke.py
  18. wrappedVTKQInvokableTest.py
  19. wrappedVTKSlotTest.py
  20. )
  21. endif()
  22. foreach(s ${SCRIPTS})
  23. get_filename_component(TESTNAME ${s} NAME_WE)
  24. SIMPLE_TEST(ctkSimplePythonShell_${TESTNAME} ${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT})
  25. endforeach()