Visual Studio 2012 + Cmake

Added by Kyle Young about 8 years ago

Is there a way to make VS2012 work with Cmake?

Replies (3)

RE: Visual Studio 2012 + Cmake - Added by Wim Dumon about 8 years ago


I haven't looked at this yet. New versions of cmake will certainly support MSVS2012 (or maybe they already do?). In the meantime, maybe generate a 2010 project and import that in 2012?

If you run into specific problems with 2012, please let me know.



RE: Visual Studio 2012 + Cmake - Added by Wim Dumon almost 8 years ago

Hello Kyle,

I tested this yesterday and had success after resolving some minor issues:

  1. cl.exe can't find some dll if you just run cmake-gui from the start menu. Therefore I started cmake-gui 2.8.10 from within a MSVS command prompt (which sets PATH correctly for msvs use), and I could then configure wt without any problems.
  2. because of older msvs versions, Wt defines inline to _inline. Now MSVS 2012 doesn't allow redefining keywords anymore, so you get a ton of errors because of this. To fix this, edit CMakeLists.txt, search for_inline, and remove the line that contains -Dinline=__inline

Wt now compiles in MSVS2012 without any problems (only tested hello.exe, and that works!)

Best regards,


RE: Visual Studio 2012 + Cmake - Added by Michael Leitman almost 8 years ago

Hey Wim and big Thank you, works like charm :)

After removing the "-Dinline=__inline"-line and setting WT_NO_BOOST_RANDOM to false (

i was able to build Wt3.2.3 using the cmake-gui, boost 1.52 and Visual Studio 2012 (with update 1) under Win7 64Bit :)

One important step to install wt on C:\ was to start Visual Studio explicit as Administrator! before running the Install Project.

Best regards

the incredible Leitman