[CMake] problem with mac linker flags

Bill Hoffman bill.hoffman at kitware.com
Wed Dec 22 16:59:00 EST 2010


On 12/22/2010 4:37 PM, Brad King wrote:
> On 12/22/2010 04:21 PM, Cochran, Bill wrote:
>> So, I guess the problem is cmake is incorrectly guessing my compiler?  I'm
>> not using intel, I'm using gnu.
>
> Both Darwin-GNU and Darwin-icc need the fix.
>
> IIRC, Apple's port of GCC documented the -headerpad_max_install_names
> flag as the way pad install names.  The compiler front-end happened
> to implement the flag just by passing it through to the linker.  Many
> of today's front-ends do not recognize this flag, so now we need to
> use -Wl, to get it through.
>
> Fixed upstream:
>
>    http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e498527f
>    http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eda7841f
>
> Will be in 2.8.4.
>

So, the real issue here is that mpicc does not support all of the flags 
that the compiler it is wrapping supports....  If you use gcc, it works 
right?

CMake did recognize that it was GNU:
  -- The C compiler identification is GNU
     -- The CXX compiler identification is GNU

My previous post was incorrect, it is not matching the name of the 
compiler.

-Bill


More information about the CMake mailing list