CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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(script ${SCRIPTS})
  23. get_filename_component(scriptname ${script} NAME_WE)
  24. add_test(
  25. NAME ctkSimplePythonShell_${scriptname}
  26. COMMAND $<TARGET_FILE:ctkSimplePythonShell> ${CMAKE_CURRENT_SOURCE_DIR}/${script}
  27. )
  28. set_property(TEST ctkSimplePythonShell_${scriptname} PROPERTY LABELS ${KIT})
  29. endforeach()