I would like to get CMake generate Visual Studio projects in a way that PreferredToolArchitecture is set to x64, so that when building in Visual Studio, x64 compiler and linker are used. The VS project file PropertyGroup for a configuration should have the PreferredToolArchitecture XML element according to this answer, e.g. as below
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
CMake doc indicate that passing -Tv140,host=x64
to the cmake command line should choose the x64 compiler.
However I do not see the PreferredToolArchitecture XML element in the generated project files.