|
@@ -16,7 +16,7 @@ foreach(snippet IN LISTS snippets)
|
|
verify_snippet_file("${snippet}" "${contents}")
|
|
verify_snippet_file("${snippet}" "${contents}")
|
|
|
|
|
|
# Append to list of collected snippet roles
|
|
# Append to list of collected snippet roles
|
|
- if (NOT role IN_LIST FOUND_SNIPPETS)
|
|
|
|
|
|
+ if (NOT role IN_LIST FOUND_SNIPPETS AND NOT role STREQUAL build)
|
|
list(APPEND FOUND_SNIPPETS ${role})
|
|
list(APPEND FOUND_SNIPPETS ${role})
|
|
endif()
|
|
endif()
|
|
|
|
|
|
@@ -133,8 +133,11 @@ endforeach()
|
|
|
|
|
|
# Verify that listed snippets match expected roles
|
|
# Verify that listed snippets match expected roles
|
|
set(EXPECTED_SNIPPETS configure generate)
|
|
set(EXPECTED_SNIPPETS configure generate)
|
|
-if (ARGS_BUILD)
|
|
|
|
- list(APPEND EXPECTED_SNIPPETS compile link custom cmakeBuild)
|
|
|
|
|
|
+if (ARGS_BUILD OR ARGS_BUILD_MAKE_PROGRAM)
|
|
|
|
+ list(APPEND EXPECTED_SNIPPETS compile link custom)
|
|
|
|
+ if (ARGS_BUILD)
|
|
|
|
+ list(APPEND EXPECTED_SNIPPETS cmakeBuild)
|
|
|
|
+ endif()
|
|
endif()
|
|
endif()
|
|
if (ARGS_TEST)
|
|
if (ARGS_TEST)
|
|
list(APPEND EXPECTED_SNIPPETS ctest test)
|
|
list(APPEND EXPECTED_SNIPPETS ctest test)
|
|
@@ -165,3 +168,21 @@ endif()
|
|
if (ARGS_TEST AND NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/Testing)
|
|
if (ARGS_TEST AND NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/Testing)
|
|
add_error("ctest --instrument launcher failed to test the project")
|
|
add_error("ctest --instrument launcher failed to test the project")
|
|
endif()
|
|
endif()
|
|
|
|
+
|
|
|
|
+# Look for build snippet, which may not appear immediately
|
|
|
|
+if (ARGS_BUILD_MAKE_PROGRAM)
|
|
|
|
+ set(NUM_TRIES 30)
|
|
|
|
+ set(DELAY 1)
|
|
|
|
+ set(foundBuildSnippet 0)
|
|
|
|
+ foreach(_ RANGE ${NUM_TRIES})
|
|
|
|
+ file(GLOB snippets LIST_DIRECTORIES false ${v1}/data/build-*)
|
|
|
|
+ if (snippets MATCHES build)
|
|
|
|
+ set(foundBuildSnippet 1)
|
|
|
|
+ break()
|
|
|
|
+ endif()
|
|
|
|
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${DELAY})
|
|
|
|
+ endforeach()
|
|
|
|
+ if (NOT foundBuildSnippet)
|
|
|
|
+ add_error("No snippet files of role \"build\" were found in ${v1}")
|
|
|
|
+ endif()
|
|
|
|
+endif()
|