CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. wrappedVTKObserverTest.py
  19. wrappedVTKQInvokableTest.py
  20. wrappedVTKSlotTest.py
  21. )
  22. endif()
  23. foreach(script ${SCRIPTS})
  24. get_filename_component(scriptname ${script} NAME_WE)
  25. add_test(
  26. NAME ctkSimplePythonShell_${scriptname}
  27. COMMAND $<TARGET_FILE:ctkSimplePythonShell> ${CMAKE_CURRENT_SOURCE_DIR}/${script}
  28. )
  29. set_property(TEST ctkSimplePythonShell_${scriptname} PROPERTY LABELS ${KIT})
  30. endforeach()