[CMake] CMAKE_<LANG>_FLAGS also used for linking?

Sean McBride sean at rogue-research.com
Fri Dec 23 14:20:39 EST 2011


On Fri, 23 Dec 2011 14:06:30 -0500, David Cole said:

>> From the lack of reply, I guess there is indeed no way to specify
>flags only for compiling and not for linking.
>>
>> Is there a bug in the Mantis for this already?
>
>I don't think so, but is it really a bug in CMake?

Obviously that's up for discussion. :)

My goal was to add the -std=c++0x flag to my dashboards, to ensure that their codebases are C++ compatible.  But that flag therefore gets passed in the link phase, and spews:

clang-3: warning: argument unused during compilation: '-std=c++0x'

So I guess my question is: how can I use -std=c++0x without getting warnings?

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the CMake mailing list