AW: [CMake] "Treat wchar as built-in type" in Cmake ?

Stephen Collyer scollyer at netspinner.co.uk
Mon Feb 11 10:02:02 EST 2008


Gerhard Grimm wrote:
> Hi Stephen,
> 
> there are two ways to have this compiler flag added in a non-global fashion:
> 
> - You can add it to specific targets using
> 
>   set_target_properties(mytarget1 mytarget2 ...
>                         PROPERTIES COMPILE_FLAGS "/Zc:wchar_t-")

This works fine - thanks to all who suggested it.

> - You can add it to specific source files using
> 
>   set_source_files_properties(mysource1 mysource2 ...
>                               PROPERTIES COMPILE_FLAGS "/Zc:wchar_t-")
> 
This is useful to know too.

I don't see how the COMPILE_CXX_FLAGS suggestion would have worked
though - isn't that a global setting ?

-- 
Regards

Steve Collyer
Netspinner Ltd


More information about the CMake mailing list