summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-25 13:45:28 +0000
committerKitware Robot <kwrobot@kitware.com>2022-03-25 09:45:35 -0400
commitd71f6964864785efc49c7028cee6ed6c149b0215 (patch)
tree10629e62344defe66e18317fd1bc97da5a1d747d /Modules
parent25b9fb0b1adcff94534443ada1ba27e564a4ead7 (diff)
parentef2fa9b03bdd468f291109d5e198d6fb7dc3b732 (diff)
downloadcmake-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.cmake4
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...")