From 6ea883d652a64dc94931c15c2a5c00ed4a9c6b8e Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 17 Sep 2021 09:28:57 -0400 Subject: Tests: Avoid output when running symlink check Since commit 58d10cf6f1 (Alternative symlink-creating mode for file(INSTALL ...), 2021-08-02) we test creating a symlink during configuration to decide whether to activate some tests. Capture the process output during the check to avoid leaking the error message on failure. --- Tests/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 4ccbfeb..da6b670 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1656,6 +1656,8 @@ if(BUILD_TESTING) "${CMake_SOURCE_DIR}/Tests/CMakeLists.txt" # random source file that exists "${CMake_BINARY_DIR}/Tests/try_to_create_symlink" # random target file in existing directory RESULT_VARIABLE _symlink_result + OUTPUT_VARIABLE _symlink_stdout + ERROR_VARIABLE _symlink_stderr ) if(_symlink_result EQUAL 0) file(REMOVE "${CMake_BINARY_DIR}/Tests/try_to_create_symlink") -- cgit v0.12