CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728
  1. set(JULIA_TEST_PROXY ${CMAKE_CURRENT_BINARY_DIR}/test.proxy)
  2. file(REMOVE ${JULIA_TEST_PROXY})
  3. # generate
  4. # call the python executable to generate the julia gateways
  5. add_custom_command(
  6. OUTPUT ${JULIA_TEST_PROXY}
  7. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/testsuite.jl ${CMAKE_CURRENT_BINARY_DIR}
  8. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_feature2d.jl ${CMAKE_CURRENT_BINARY_DIR}
  9. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_objdetect.jl ${CMAKE_CURRENT_BINARY_DIR}
  10. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_imgproc.jl ${CMAKE_CURRENT_BINARY_DIR}
  11. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_mat.jl ${CMAKE_CURRENT_BINARY_DIR}
  12. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_dnn.jl ${CMAKE_CURRENT_BINARY_DIR}
  13. COMMAND ${CMAKE_COMMAND} -E touch ${JULIA_TEST_PROXY}
  14. COMMENT "Building Julia tests"
  15. )
  16. # targets# opencv_julia_sources --> opencv_julia
  17. add_custom_target(opencv_test_julia ALL DEPENDS ${JULIA_TEST_PROXY})
  18. add_dependencies(opencv_test_julia ${the_module})
  19. message(STATUS "Placing Julia tests in ${CMAKE_CURRENT_BINARY_DIR}")
  20. # run the julia test suite
  21. add_test(NAME opencv_test_julia
  22. COMMAND ${Julia_EXECUTABLE} "testsuite.jl"
  23. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  24. )