<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;">> Date: Sun, 3 Feb 2013 07:52:28 -0500</span><br><div>> From: bill.hoffman@kitware.com<br>> To: cmake@cmake.org<br>> Subject: Re: [CMake] Visual studio november CTP compiler?<br>> <br>> On 2/2/2013 8:46 PM, terje loe wrote:<br>> > Anyone know how I can setup cmake to change the visual studio compiler<br>> > to the CTP november C++ compiler?<br>> ><br>> > http://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx<br>> Looks interesting.<br>> <br>> "After downloading and installing the program, you can launch Visual <br>> Studio 2012, load your C++ project and you can switch to the new <br>> compilers.We recommend you can create a separate project configuration <br>> from menu Build > Configuration Manager by duplicating your existing <br>> configuration and then follow the steps below:<br>> <br>> Open Project Property Pages (Alt+F7 under the Visual C++ mappings)<br>> From the ‘General’ tab, change ‘Platform toolset’ from ‘Visual <br>> Studio 2012 (v110)’ to ‘Microsoft Visual C++ Compiler Nov 2012 CTP <br>> (v120_CTP_Nov)’ and close the Property Pages<br>> Launch a full rebuild of your project"<br>> <br>> Sounds like you could run cmake, then follow the above steps to get it <br>> working. Sounds like it might require some cmake changes to support it <br>> directly. The usual process would be to generate a project, follow the <br>> above steps, then diff the files and figure out what cmake will need to <br>> create this natively.<br>> <br>> <br>> -- <br>> Bill Hoffman<br>> Kitware, Inc.<br>> 28 Corporate Drive<br>> Clifton Park, NY 12065<br>> bill.hoffman@kitware.com<br>> http://www.kitware.com<br>> 518 881-4905 (Direct)<br>> 518 371-3971 x105<br>> Fax (518) 371-4573<br>> --<br>> <br>> Powered by www.kitware.com<br>> <br>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>> <br>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br>> <br>> Follow this link to subscribe/unsubscribe:<br>> 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->GetPlatformToolset())</div><div> {</div><div> std::string pts = "<PlatformToolset>";</div><div> pts += toolset;</div><div> pts += "</PlatformToolset>\n";</div><div> this->WriteString(pts.c_str(), 2);</div><div> }</div></div><div><br></div><div>Into this:</div><div><br></div><div><div>if(this->Target->GetProperty("PLATFORM_TOOLSET"))</div><div><span style="font-size: 10pt;"> {</span></div><div><span style="font-size: 10pt;"> this->WriteString(((std::string)"<PlatformToolset>" + this->Target->GetProperty("PLATFORM_TOOLSET") + "</PlatformToolset>").c_str(), 2);</span></div><div><span style="font-size: 10pt;"> }</span></div><div><span style="font-size: 10pt;">else if(const char* toolset = gg->GetPlatformToolset())</span></div><div> {</div><div> std::string pts = "<PlatformToolset>";</div><div> pts += toolset;</div><div> pts += "</PlatformToolset>\n";</div><div> this->WriteString(pts.c_str(), 2);</div><div> }</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>