diff options
author | Laurent Tarrisse <laurent@mbdsys.com> | 2016-06-20 18:35:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-21 12:48:09 (GMT) |
commit | 867b73e27554d9a6a0c33e76af4a06901504816f (patch) | |
tree | 3f322cbe9846d5b83d53f79d7d93f2896164f8e1 /Modules | |
parent | cd1f1cb544267911829ac777214474f5ce3491f1 (diff) | |
download | CMake-867b73e27554d9a6a0c33e76af4a06901504816f.zip CMake-867b73e27554d9a6a0c33e76af4a06901504816f.tar.gz CMake-867b73e27554d9a6a0c33e76af4a06901504816f.tar.bz2 |
GetPrerequisites: Optimize on Windows by filtering `objdump` output
Extend the optimization from commit v3.4.0-rc1~264^2 (GetPrerequisites:
Optionally filter "objdump" output for speed, 2015-07-29) to work
on Windows by using `findstr` in place of `grep`.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 375349f..1981040 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -747,7 +747,11 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa set(gp_regex_fallback "") set(gp_regex_cmp_count 1) # objdump generaates copious output so we create a grep filter to pre-filter results - find_program(gp_grep_cmd grep) + if(WIN32) + find_program(gp_grep_cmd findstr) + else() + find_program(gp_grep_cmd grep) + endif() if(gp_grep_cmd) set(gp_cmd_maybe_filter COMMAND ${gp_grep_cmd} "^[[:blank:]]*DLL Name: ") endif() |