[cmake-developers] Modules/GetPrequisites.cmake issues

Bill Hoffman bill.hoffman at kitware.com
Wed Jul 29 11:07:37 EDT 2015


On 7/29/2015 10:17 AM, Bill Somerville wrote:
>> Is there a reason not to look for objdump before dumpbin?
> I was under the impression that dumpbin was selected first for non-MinGW
> Windows builds, I have no idea if objdump works with binaries produced
> by compilers other than GNU/CLang. This is why I commented about
> detecting MinGW, there are mentions of a MINGW CMake system variable but
> it doesn't seem to exist.
Yes, that is the problem.  This is  a standalone script that is run at 
install time, so it does not have any information about the build 
toolchain. In retrospect it should have been passed more information 
about the build tool chain that was used.

This is what we want:

#    dumpbin (Windows)
#    objdump (MinGW on Windows)
#    ldd (Linux/Unix)
#    otool (Mac OSX)

Trouble is dumpbin and objdump might both be in the PATH on Windows. 
You don't really know which one to use.     I wonder if you found both 
if you could call something on each of them with one of the binaries, if 
you could figure out what tool would work better with it.

-Bill


More information about the cmake-developers mailing list