[CMake] CFlags being passed to Linker (OS X, ICC)
Mike Jackson
imikejackson at gmail.com
Fri Feb 1 16:53:31 EST 2008
On Feb 1, 2008, at 4:46 PM, Bill Hoffman wrote:
> Mike Jackson wrote:
>> On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote:
>>> Mike Jackson wrote:
>>>> I am trying to develop an icpc module file for Darwin and one of
>>>> the problems that seems to be cropping up is that cmake is
>>>> passing compiler flags to the linker. Specifically I have
>>>> entered some values for CMAKE_CXX_FLAGS and the compile is fine
>>>> but the linker gets all messed up:
>>>
>>> That is this stuff:
>>>
>>> SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
>>> SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
>>>
>>> The -w gets removed by cmake. I think you can just remove these
>>> flags in the Darwin-icpc.cmake file and you should be fine.
>>>
>>> -Bill
>> Tried commenting out those lines, then blew away my build
>> directory and started over. Same problem. Any other ideas? We
>> revisited this once last year some time. I just can't find what we
>> did to fix it.. or I never did anything and just stopped using the
>> -wd### flag..
> Running a different version of CMake, than the one you are
> changing? If you get rid of those lines, it should leave -w stuff
> alone.
>
> It clearly stripped out the -w:
>
> /usr/bin/icpc -DMXADataModel_EXPORTS -wd1170,981,383,424
> /usr/bin/icpc d1170,981,383,424
>
>
> -Bill
Nope, same version. I added a MESSAGE (FATAL "Darwin-icpc.cmake" ) as
the top line in the Darwin-icpc.cmake file and here is the output
from a cmake run in a clean build directory:
516:[mjackson at Thor:Build]$ cmake ../
-- Check for working C compiler: /usr/bin/icc
-- Check for working C compiler: /usr/bin/icc -- works
-- Check size of void*
-- Check size of void* - done
FATALDarwin-icpc.cmake
-- Check for working CXX compiler: /usr/bin/icpc
FATALDarwin-icpc.cmake
-- Check for working CXX compiler: /usr/bin/icpc -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mjackson/Workspace/FSTest/
Build
517:[mjackson at Thor:Build]$ cmake -version
cmake version 2.4-patch 7
Here is the thread from last year.
<http://www.cmake.org/pipermail/cmake/2007-January/012436.html>
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
More information about the CMake
mailing list