Tests: Teach RunCMake infrastructure to use custom check.cmake file

This commit is contained in:
Brad King 2015-09-16 10:07:49 -04:00
parent f38625be7a
commit 438fabf242
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,11 @@ function(run_cmake test)
endif()
endforeach()
unset(RunCMake_TEST_FAILED)
include(${top_src}/${test}-check.cmake OPTIONAL)
if(RunCMake-check-file AND EXISTS ${top_src}/${RunCMake-check-file})
include(${top_src}/${RunCMake-check-file})
else()
include(${top_src}/${test}-check.cmake OPTIONAL)
endif()
if(RunCMake_TEST_FAILED)
set(msg "${RunCMake_TEST_FAILED}\n${msg}")
endif()