On 07/28/2015 11:32 AM, Bill Somerville wrote:
> I have checked for objdump command options to reduce the output but 
> there don't appear to be any that help. TBH running from the command 
> line as, for example:
> 
>   $ objdump -p <executable> | grep 'DLL Name:'
> 
> runs in a fraction of a second compared with up to 10 minutes on an i7 
> CPU for the GetPrerequisites version that messes around with the output 
> in a CMake variable.

FYI, execute_process supports multiple COMMAND options and will construct
a pipeline threading each command's stdout to the next command's stdin.
Therefore you should be able to do piping like the above if you know a
grep is available.  Otherwise you could also consider using OUTPUT_FILE
to put the output in a temporary file and then use file(STRINGS) to load
a subset of it into memory.

-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

Reply via email to