[CMake] Add_definitions() also affects RC_FLAGS ?
bill.hoffman at kitware.com
Sun Jun 22 15:25:21 EDT 2008
Christian Ehrlicher wrote:
> We've something like this in one of our scripts:
> 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
More information about the CMake