Let’s make a demonstration by example :

// With grep
$ objdump -p /c/msys32/mingw32.exe | grep "^[[:blank:]]*DLL Name: "
        DLL Name: KERNEL32.dll
        DLL Name: msvcrt.dll
        DLL Name: USER32.dll

// With findstr
$ objdump -p /c/msys32/mingw32.exe | findstr "^[[:blank:]]*DLL Name: "
        DLL Name: KERNEL32.dll
        DLL Name: msvcrt.dll
        DLL Name: USER32.dll

Outputs are identical.

Attached a git patch against current cmake master branch. (I will make later 
another patch about *GET_PREREQUISITES_ANALYZED_${target}*)


Attachment: 0001-Use-findstr-instead-of-grep-on-Windows-host-in-conjo.patch
Description: Binary data



Laurent


> Le 20 juin 2016 à 16:48, Brad King <brad.k...@kitware.com> a écrit :
> 
> On 06/18/2016 12:10 PM, laurent wrote:
>> I would like to share my experience about speed up package with 
>> BundleUtilities
>> on Windows host using mingw32 env.
> 
> Thanks.  Please provide a
> 
>  Full Name <email@address>
> 
> format name for the commit authorship record.
> 
>> -    find_program(gp_grep_cmd grep)
>> +    if(WIN32)
>> +      find_program(gp_grep_cmd findstr)
>> +    else()
>> +      find_program(gp_grep_cmd grep)
>> +    endif()
> 
> Good.  Is `findstr` command-line compatible with `grep` for the use case
> in question?
> 
>> +    GET_PROPERTY(MyLocalVariable GLOBAL PROPERTY MY_PREREQUISE)
>> +    list(APPEND analysed ${MyLocalVariable} ${target})
>> +    list(REMOVE_DUPLICATES analysed) 
>> +    SET_PROPERTY(GLOBAL PROPERTY MY_PREREQUISE ${analysed})
> 
> Rather than maintaining and searching a list in CMake code, please try
> recording each target in a dedicated variable or property name, e.g.
> `GET_PREREQUISITES_ANALYZED_${target}`.
> 
> Thanks,
> -Brad
> 

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to