<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<span style="font-size: 10pt;">&gt; Date: Sun, 3 Feb 2013 07:52:28 -0500</span><br><div>&gt; From: bill.hoffman@kitware.com<br>&gt; To: cmake@cmake.org<br>&gt; Subject: Re: [CMake] Visual studio november CTP compiler?<br>&gt; <br>&gt; On 2/2/2013 8:46 PM, terje loe wrote:<br>&gt; &gt; Anyone know how I can setup cmake to change the visual studio compiler<br>&gt; &gt; to the CTP november C++ compiler?<br>&gt; &gt;<br>&gt; &gt; http://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx<br>&gt; Looks interesting.<br>&gt; <br>&gt; "After downloading and installing the program, you can launch Visual <br>&gt; Studio 2012, load your C++ project and you can switch to the new <br>&gt; compilers.We recommend you can create a separate project configuration <br>&gt; from menu Build &gt; Configuration Manager by duplicating your existing <br>&gt; configuration and then follow the steps below:<br>&gt; <br>&gt;      Open Project Property Pages (Alt+F7 under the Visual C++ mappings)<br>&gt;      From the ‘General’ tab, change ‘Platform toolset’ from ‘Visual <br>&gt; Studio 2012 (v110)’ to ‘Microsoft Visual C++ Compiler Nov 2012 CTP <br>&gt; (v120_CTP_Nov)’ and close the Property Pages<br>&gt;      Launch a full rebuild of your project"<br>&gt; <br>&gt; Sounds like you could run cmake, then follow the above steps to get it <br>&gt; working.  Sounds like it might require some cmake changes to support it <br>&gt; directly.  The usual process would be to generate a project, follow the <br>&gt; above steps, then diff the files and figure out what cmake will need to <br>&gt; create this natively.<br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Bill Hoffman<br>&gt; Kitware, Inc.<br>&gt; 28 Corporate Drive<br>&gt; Clifton Park, NY 12065<br>&gt; bill.hoffman@kitware.com<br>&gt; http://www.kitware.com<br>&gt; 518 881-4905 (Direct)<br>&gt; 518 371-3971 x105<br>&gt; Fax (518) 371-4573<br>&gt; --<br>&gt; <br>&gt; Powered by www.kitware.com<br>&gt; <br>&gt; Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>&gt; <br>&gt; Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br>&gt; <br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.cmake.org/mailman/listinfo/cmake<br></div><div><br></div><div>As I got 15 projects in my solution I don't want to change each project manualy everytime I run CMake so I found a solution..</div><div><br></div><div>In cmVisualStudio10TargetGenerator.cxx on line 434 I changed this:</div><div><div><br></div><div>if(const char* toolset = gg-&gt;GetPlatformToolset())</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; std::string pts = "&lt;PlatformToolset&gt;";</div><div>&nbsp; &nbsp; &nbsp; pts += toolset;</div><div>&nbsp; &nbsp; &nbsp; pts += "&lt;/PlatformToolset&gt;\n";</div><div>&nbsp; &nbsp; &nbsp; this-&gt;WriteString(pts.c_str(), 2);</div><div>&nbsp; &nbsp; &nbsp; }</div></div><div><br></div><div>Into this:</div><div><br></div><div><div>if(this-&gt;Target-&gt;GetProperty("PLATFORM_TOOLSET"))</div><div><span style="font-size: 10pt;">&nbsp; {</span></div><div><span style="font-size: 10pt;">&nbsp; this-&gt;WriteString(((std::string)"&lt;PlatformToolset&gt;" + this-&gt;Target-&gt;GetProperty("PLATFORM_TOOLSET") + "&lt;/PlatformToolset&gt;").c_str(), 2);</span></div><div><span style="font-size: 10pt;">&nbsp; }</span></div><div><span style="font-size: 10pt;">else if(const char* toolset = gg-&gt;GetPlatformToolset())</span></div><div>&nbsp; {</div><div>&nbsp; std::string pts = "&lt;PlatformToolset&gt;";</div><div>&nbsp; pts += toolset;</div><div>&nbsp; pts += "&lt;/PlatformToolset&gt;\n";</div><div>&nbsp; this-&gt;WriteString(pts.c_str(), 2);</div><div>&nbsp; }</div></div><div><br></div><div>Then I need to set the target property of my projects:</div><div><br></div><div>set_target_properties(MyTarget PROPERTIES PLATFORM_TOOLSET "v120_CTP_Nov2012")</div><div><br></div><div>I don't know if this is the correct way to do it, but if it is it would be cool if it was implemented.. or some other solution.</div><div><br></div><div><br></div><div>T.</div>                                               </div></body>
</html>