summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorfriendlyanon <friendlyanon_@hotmail.com>2021-05-01 14:10:43 (GMT)
committerfriendlyanon <friendlyanon_@hotmail.com>2021-05-04 18:30:18 (GMT)
commitd2b856bc9219d7176ae8fd394843151e27021a8e (patch)
treecaf4aa07a4bde9260fbebf5ec2cbca6f456e3405 /Tests
parentfc2ac460435df289149e4faaf494e6b287071a8c (diff)
downloadCMake-d2b856bc9219d7176ae8fd394843151e27021a8e.zip
CMake-d2b856bc9219d7176ae8fd394843151e27021a8e.tar.gz
CMake-d2b856bc9219d7176ae8fd394843151e27021a8e.tar.bz2
ctest_build: Add the PARALLEL_LEVEL argument
Fixes: #19712
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/ctest_build/ParallelLevel-check.cmake11
-rw-r--r--Tests/RunCMake/ctest_build/RunCMakeTest.cmake1
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_build/ParallelLevel-check.cmake b/Tests/RunCMake/ctest_build/ParallelLevel-check.cmake
new file mode 100644
index 0000000..f45d2a2
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/ParallelLevel-check.cmake
@@ -0,0 +1,11 @@
+file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml")
+if(build_xml_file)
+ file(STRINGS "${build_xml_file}" build_cmd LIMIT_COUNT 1 REGEX "<BuildCommand>")
+ if(NOT build_cmd MATCHES [[ --parallel "1"]])
+ set(RunCMake_TEST_FAILED
+ "Build.xml does not have expected build command with --parallel flag"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Build.xml not found")
+endif()
diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
index 072fbac..511cd71 100644
--- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
@@ -10,6 +10,7 @@ function(run_ctest_build CASE_NAME)
endfunction()
run_ctest_build(BuildQuiet QUIET)
+run_ctest_build(ParallelLevel PARALLEL_LEVEL 1)
function(run_BuildFailure)
set(CASE_CMAKELISTS_SUFFIX_CODE [[