mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
Tests: Hide errors from ldd --help output check
If `--help` is not a valid option then it may print content to stderr, so we need to capture that.
This commit is contained in:
1 parent
dbc0ec1648
commit
d6a6024e9e
1 file changed
+2
-1
@@ -309,7 +309,8 @@ endif()
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
||||
if(UNIX AND NOT CYGWIN)
|
||||
execute_process(COMMAND ldd --help
|
||||
OUTPUT_VARIABLE LDD_HELP)
|
||||
OUTPUT_VARIABLE LDD_HELP
|
||||
ERROR_VARIABLE LDD_ERR)
|
||||
if("${LDD_HELP}" MATCHES
|
||||
"(-r, --function-relocs.*process data and function relocations.*-u, --unused.*print unused direct dependencies)")
|
||||
add_RunCMake_test(LinkWhatYouUse)
|
||||
|
||||
Reference in new issue
Block a user