summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/try_compile
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-23 15:46:11 (GMT)
committerBrad King <brad.king@kitware.com>2021-02-23 15:55:12 (GMT)
commitd33c2c93d8d006f1270c800d5f6a0b3c493e4404 (patch)
tree7ef7e6de277332db0a1879b7059ff937d67fbb93 /Tests/RunCMake/try_compile
parent759923420b0ba4e2733d41ece561b1f9e715bccf (diff)
downloadCMake-d33c2c93d8d006f1270c800d5f6a0b3c493e4404.zip
CMake-d33c2c93d8d006f1270c800d5f6a0b3c493e4404.tar.gz
CMake-d33c2c93d8d006f1270c800d5f6a0b3c493e4404.tar.bz2
Tests: Update for upstream ninja change to write status on stderr
Upstream ninja commit `ad3d29fb53` (Put builder output through status interface) from ninja PR 1899 changed the status output from stdout to stderr. In particular, `ninja: no work to do` is now printed on stderr. Update our RunCMake tests to accept this difference. A few RunCMake test cases check for `ninja: no work to do`. For those, move the message to stdout using `RunCMake_TEST_OUTPUT_MERGE`. The rest of the test cases do not care about the message, so remove it from the actual stderr content before comparing against that expected.
Diffstat (limited to 'Tests/RunCMake/try_compile')
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index 5b849bf..fffb038 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -93,7 +93,9 @@ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
message(STATUS "RerunCMake: first configuration...")
run_cmake(RerunCMake)
if(NOT CMake_TEST_FILESYSTEM_1S)
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command(RerunCMake-nowork${ninja} ${CMAKE_COMMAND} --build .)
+ unset(RunCMake_TEST_OUTPUT_MERGE)
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution
@@ -101,7 +103,9 @@ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
file(WRITE "${in_tc}" "does-not-compile\n")
run_cmake_command(RerunCMake-rerun${ninja} ${CMAKE_COMMAND} --build .)
if(NOT CMake_TEST_FILESYSTEM_1S)
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command(RerunCMake-nowork${ninja} ${CMAKE_COMMAND} --build .)
+ unset(RunCMake_TEST_OUTPUT_MERGE)
endif()
unset(RunCMake_TEST_BINARY_DIR)