[CMake] Adding C(XX)FLAGS by using an environment variable?

Mike Jackson mike.jackson at imts.us
Wed Jul 2 11:24:25 EDT 2008


On Jul 2, 2008, at 11:10 AM, Mike Arthur wrote:

> On Wednesday 02 July 2008 16:05:09 you wrote:
>>     Are you using the Eclipse generator or just the Makefiles
>> generator? Also what version of CMake.
> Makefiles generator, CMake 2.6 so I don't want to do it at  
> generation time.
> I'll try Alan's solution.
>
> -- 
> Cheers,
> Mike Arthur
>
But isn't cmake going to pick up the env variable and then tack that  
onto the CMAKE_CXX_FLAGS during cmake time? It does when you set the  
compiler this way. export CXX=icc and then run cmake and you compiler  
is now intel's c++ compiler.

    What problems does having the -fmessage-length=0 flag in a  
makefile cause? I have it defined whenever the compiler is gcc and  
presently I don't seem to have issues. I am just curious about what I  
might run into on other platforms where this may become an issue?

Thanks.
-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services




More information about the CMake mailing list