[CMake] BundleUtilities not working

Bill Somerville bill at classdesign.com
Tue Jul 28 12:51:48 EDT 2015


On 28/07/2015 17:47, Brad King wrote:
Hi Brad,
> 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.
OK, on the execute_process() pipeline, I have tried that and it works 
well. Not quite as fast as the shell equivalent but easily fast enough 
for this. The possible lack of grep is a potential issue so your read 
back from file suggestion is interesting, is there a recognized place to 
write temporary files like this?
>
> -Brad
>
73
Bill Somerville.


More information about the CMake mailing list