1 set(JAVA_EXECUTABLE ${Java_JAVA_EXECUTABLE} -ea -Djava.library.path=.)
3 function(building target)
4 add_jar(java.test.${target} INCLUDE_JARS ajar
5 SOURCES _${target}.java ${SOURCES}
11 function(unittest target)
15 get_filename_component(ext ${arg} EXT)
17 if(NOT ext OR IS_ABSOLUTE ${arg})
18 list(APPEND ARGS ${arg})
20 list(APPEND ARGS ${CMAKE_CURRENT_BINARY_DIR}/${arg})
24 add_test(NAME jar_${target} WORKING_DIRECTORY ${WORKING_DIRECTORY}
25 COMMAND ${JAVA_EXECUTABLE} -jar ${CMAKE_CURRENT_BINARY_DIR}/${target}.jar ${ARGS}
27 set_tests_properties(jar_${target} PROPERTIES TIMEOUT 30
28 FAIL_REGULAR_EXPRESSION "ERROR;error"