How to add defines for a specific compiler
William A. Hoffman
billlist at nycap.rr.com
Wed Feb 15 14:18:19 CET 2006
At 08:07 AM 2/15/2006, you wrote:
>Christian Ehrlicher wrote:
>> Hi,
>>
>> How can I add those two defines for msvc (2005)?
>> -D_CRT_SECURE_NO_DEPRECATE & -D_CRT_NONSTDC_NO_DEPRECATE
>>
>> Christian
>>
>
>adding the defines in a special cmake file is done by
>
>if (MSVC)
> add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
>endif (MSVC)
>
>But it seems to me we could add this defines generally in
>cmake/modules/FindKDE4.cmake line 208.
For that particular flag, only the 2005 compiler needs it:
We use this in CMake:
IF(CMAKE_COMPILER_2005)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
ENDIF(CMAKE_COMPILER_2005)
-Bill
More information about the Kde-buildsystem
mailing list