[CMake] BundleUtilities not working

Brad King brad.king at kitware.com
Tue Jul 28 12:47:05 EDT 2015


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



More information about the CMake mailing list