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