[CMake] VS 2013 and 64 bit toolchain

cheesy4poofs at cox.net cheesy4poofs at cox.net
Tue Feb 18 20:51:44 EST 2014


I'm constantly getting out of memory errors with VS 2013 and the x86 linker.  I stumbled across this blog post that recommends moving to the 64 bit linker.  http://blogs.msdn.com/b/vcblog/archive/2013/10/30/the-visual-c-linker-best-practices-developer-iteration.aspx

The article mentions adding /Bv to the command line to invoke the 64 bit linker.  However, it appears that isn't exactly right.  Later on in the comments, it is revealed that you have to edit all the *.vcxproj files and add:

<UseNativeEnvironment>true</UseNativeEnvironment>

to the x64 PropertyGroup for all 4 build types (Debug, Release, MinSizeRelease, RelWithDebInfo).  So far I've come up empty handed with a way to do this in CMake.

1) Is it possible to force CMake to add this option to each VS project file?
or
2) Is it possible to have CMake run an external command after generation which I could code to add that to the project files?

Thanks for any help.

Scott


More information about the CMake mailing list