diff options
author | Brad King <brad.king@kitware.com> | 2022-03-25 13:45:28 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-25 09:45:35 -0400 |
commit | d71f6964864785efc49c7028cee6ed6c149b0215 (patch) | |
tree | 10629e62344defe66e18317fd1bc97da5a1d747d /Modules | |
parent | 25b9fb0b1adcff94534443ada1ba27e564a4ead7 (diff) | |
parent | ef2fa9b03bdd468f291109d5e198d6fb7dc3b732 (diff) | |
download | cmake-d71f6964864785efc49c7028cee6ed6c149b0215.tar.gz |
Merge topic 'GetPrerequisties-win-findstr'
ef2fa9b03b GetPrerequisties: pass "-a" only to grep.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7110
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 53584c639a..0ba35b6b79 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -755,11 +755,13 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa # objdump generates copious output so we create a grep filter to pre-filter results if(WIN32) find_program(gp_grep_cmd findstr) + set(gp_grep_cmd_arg "") else() find_program(gp_grep_cmd grep) + set(gp_grep_cmd_arg "-a") endif() if(gp_grep_cmd) - set(gp_cmd_maybe_filter COMMAND ${gp_grep_cmd} "-a" "^[[:blank:]]*DLL Name: ") + set(gp_cmd_maybe_filter COMMAND ${gp_grep_cmd} "${gp_grep_cmd_arg}" "^[[:blank:]]*DLL Name: ") endif() else() message(STATUS "warning: gp_tool='${gp_tool}' is an unknown tool...") |