[CMake] Setting Platform (Win32 or x64) for Visual Studio in CMake

Bill Hoffman bill.hoffman at kitware.com
Wed Oct 26 09:45:11 EDT 2011


On 10/26/2011 9:18 AM, Ludovic Hoyet wrote:
> Hi,
>
> I am trying to generate VCproj for Visual Studio 32 and 64bit, and I
> would like to have the possibility to have both the 32bit version and
> the 64bit version in a single sln file. For this in Visual studio I can
> set the platform to x^$ for the configurations that I want, but I need
> to do it by hand every time.
>
> Is there a way to set the platform for a given configuration in CMake?
>
> At the moment, I manage to define the Debug, Release, Debug_x64 and
> Release_x64 configurations, but the platform is either Win32 or x64 for
> all of them. I do not manage to get the x64 for only the corresponding
> configurations.
>
> Any idea about how to set this ? It is because we don't want to have to
> generate two projects, one for 32 and one for 64 bit applications...
>
Currently, there is no way to do this with CMake, they have to be 
separate build trees.

-Bill



More information about the CMake mailing list