| 1 |
include(FindPerl) |
| 2 |
|
| 3 |
set(office_dir |
| 4 |
"${radiance_BINARY_DIR}/Downloads/Source/radiance_support/obj/office") |
| 5 |
set(test_dir "${CMAKE_CURRENT_BINARY_DIR}") |
| 6 |
|
| 7 |
configure_file(setup_paths.cmake.in setup_paths.cmake @ONLY) |
| 8 |
# configure these files so that they will be in the binary |
| 9 |
# directory. This will allow them to include setup_paths.cmake |
| 10 |
# from the binary directory and just use regular variables in the |
| 11 |
# configured files. |
| 12 |
configure_file(test_setup.cmake test_setup.cmake COPYONLY) |
| 13 |
configure_file(test_rtrace.cmake test_rtrace.cmake COPYONLY) |
| 14 |
configure_file(test_rpict.cmake test_rpict.cmake COPYONLY) |
| 15 |
configure_file(test_getinfo.cmake test_getinfo.cmake COPYONLY) |
| 16 |
configure_file(test_pcond.cmake test_pcond.cmake COPYONLY) |
| 17 |
configure_file(test_falsecolor.cmake test_falsecolor.cmake COPYONLY) |
| 18 |
configure_file(test_DC.cmake test_DC.cmake COPYONLY) |
| 19 |
|
| 20 |
add_test(test_setup ${CMAKE_COMMAND} |
| 21 |
-P ${CMAKE_CURRENT_BINARY_DIR}/test_setup.cmake) |
| 22 |
set_tests_properties(test_setup PROPERTIES FAIL_REGULAR_EXPRESSION |
| 23 |
"No such file|not found|cannot find file|unexpected character") |
| 24 |
|
| 25 |
add_test(test_rtrace |
| 26 |
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_rtrace.cmake) |
| 27 |
set_tests_properties(test_rtrace PROPERTIES PASS_REGULAR_EXPRESSION "passed" |
| 28 |
FAIL_REGULAR_EXPRESSION "failed" |
| 29 |
DEPENDS "setup") |
| 30 |
add_test(test_rpict |
| 31 |
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_rpict.cmake) |
| 32 |
set_tests_properties(test_rpict PROPERTIES PASS_REGULAR_EXPRESSION "passed" |
| 33 |
FAIL_REGULAR_EXPRESSION "failed" |
| 34 |
DEPENDS "setup") |
| 35 |
add_test(test_getinfo |
| 36 |
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_getinfo.cmake) |
| 37 |
add_test(test_pcond |
| 38 |
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_pcond.cmake) |
| 39 |
set_tests_properties(test_pcond PROPERTIES PASS_REGULAR_EXPRESSION "passed" |
| 40 |
FAIL_REGULAR_EXPRESSION "failed" |
| 41 |
DEPENDS "setup") |
| 42 |
if(PERL_FOUND) |
| 43 |
add_test(test_falsecolor |
| 44 |
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_falsecolor.cmake) |
| 45 |
set_tests_properties(test_falsecolor PROPERTIES PASS_REGULAR_EXPRESSION "passed" |
| 46 |
FAIL_REGULAR_EXPRESSION "failed" |
| 47 |
DEPENDS "setup") |
| 48 |
add_test(test_DC |
| 49 |
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_DC.cmake) |
| 50 |
set_tests_properties(test_DC PROPERTIES PASS_REGULAR_EXPRESSION "passed" |
| 51 |
FAIL_REGULAR_EXPRESSION "failed" |
| 52 |
DEPENDS "setup") |
| 53 |
endif() |