[CMake] Add_definitions() also affects RC_FLAGS ?
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Sun Jun 22 15:51:39 EDT 2008
Bill Hoffman schrieb:
> Christian Ehrlicher wrote:
>> Hi,
>>
>> We've something like this in one of our scripts:
>>
>> add_definitions(-EHsc)
>> and we add a .rc - file to the sources.
>> Now rc.exe fails because of unknown command '-EHsc' because
>> add_defintions() is also dded to RC_FLAGS... :(
>>
>> [ 85%] Building RC object ksirk/ksirk/CMakeFiles/ksirk.dir/ksirk.res
>> fatal error RC1106: invalid option: -EHsc
>>
>>
>> Any idea how to fix this?
>
>
> Don't use add_definitions for compiler flags. Use CMAKE_CXX_FLAGS or
> CMAKE_C_FLAGS.
>
thx,
Christian
More information about the CMake
mailing list