1
0

function.cmake 617 B

12345678910111213141516171819202122
  1. function(add_new_test name)
  2. set(oneValueArgs WORK)
  3. set(multiValueArgs COMMAND PROPERTIES)
  4. cmake_parse_arguments(ant "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
  5. if (ant_WORK)
  6. set(work ${ant_WORK})
  7. else()
  8. set(work ${CMAKE_BINARY_DIR})
  9. endif()
  10. add_test(NAME ${name} COMMAND ${ant_COMMAND} WORKING_DIRECTORY ${work})
  11. if (ant_PROPERTIES)
  12. set_tests_properties(${name} PROPERTIES ${ant_PROPERTIES})
  13. endif()
  14. endfunction()
  15. function(set_test_label label)
  16. set(test ${ARGN})
  17. set_tests_properties(${test} PROPERTIES LABELS "${label}")
  18. endfunction()