mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 23:00:07 -06:00
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.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user