[CMake] WIN32 definition gone in cmake 2.4.2

Mike Talbot mtalbot at abingdon.oilfield.slb.com
Wed Jun 14 06:37:01 EDT 2006


Jan Woetzel wrote:
> Mike Talbot wrote:
>
>> 2.4.2 ... doesn't define the preprocessor symbol WIN32 ... for the VS 
>> 7.1 generator. 
>
> I cannot confirm this.
>
> It works here as expected
> - with cmake 2.4.2 on Windows
> - using Visual studio .net 2003 generator.
>
> Have a look at a hello world example, buildlog etc.
>
> Jan.
>
Found the problem - the WIN32 definition has moved into CMAKE_CXX_FLAGS, 
where previously it was just generated automatically in the project.  
Unfortunately my project sets CMAKE_CXX_FLAGS (and didn't include 
/DWIN32 as it wasn't necessary before) - easy to add though.

Thanks,
Mike



More information about the CMake mailing list