[CMake] windows build add compiler flag

j s j.s4403 at gmail.com
Wed Aug 5 11:58:38 EDT 2009


Thank you.  Applying this procedure for CMAKE_C_FLAGS and CMAKE_CXX_FLAGS
fixed the problem.

Juan

On Wed, Aug 5, 2009 at 3:41 AM, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> try something like
>
> IF(MSVC)
>        SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /fp:strict")
> ENDIF(MSVC)
>
> - Dominik
>
> j s wrote:
>
>> In my CMakeLists.txt, how do I tell the windows build to use "/fp:strict"
>> as a c and c++ compiler flag for any conceivable build type?
>>  ADD_DEFINITIONS does not appear to work.
>>
>> Thanks,
>>
>> Juan
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
> --
> d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
> c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
> . . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
> . . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090805/1e372e19/attachment.htm>


More information about the CMake mailing list