소스 검색

Tests: Add RunCMake "prep" step

Give tests a chance to write content to the build tree before CMake
runs on it.
Brad King 7 년 전
부모
커밋
c3635e502c
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Tests/RunCMake/RunCMake.cmake

+ 5 - 0
Tests/RunCMake/RunCMake.cmake

@@ -45,6 +45,11 @@ function(run_cmake test)
     file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
   endif()
   file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+  if(RunCMake-prep-file AND EXISTS ${top_src}/${RunCMake-prep-file})
+    include(${top_src}/${RunCMake-prep-file})
+  else()
+    include(${top_src}/${test}-prep.cmake OPTIONAL)
+  endif()
   if(NOT DEFINED RunCMake_TEST_OPTIONS)
     set(RunCMake_TEST_OPTIONS "")
   endif()