Hi,

Microsoft has added support for remote-compiling and -debugging on
Linux from within Visual Studio through an official VS extension:
https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/

My question: is it already possible to generate a Visual Studio
solution for this scenario? If not, is support for this planned,
similar to the Android cross-compile scenario?

It would be nice if I could generate such a solution with (for instance):

cmake -G "Visual Studio 14" -DCMAKE_SYSTEM_NAME=VSLinux

I've been looking at the generated solution files, and the only
'interesting' part in the vxproj file seems to be this section:

---
  <PropertyGroup Label="Globals">
    <ProjectGuid>{2e73db3c-a17c-4694-996c-2cca151ed9f2}</ProjectGuid>
    <Keyword>Linux</Keyword>
    <RootNamespace>ConsoleApplication1</RootNamespace>
    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
    <ApplicationType>Linux</ApplicationType>
    <ApplicationTypeRevision>1.0</ApplicationTypeRevision>
    <TargetLinuxPlatform>Generic</TargetLinuxPlatform>
    <LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
  </PropertyGroup>
---

There seems to be a hardwired mapping between Visual Studio compiler
options and gcc/clang options, for instance setting optimization to
-O3 in the VS property dialog adds these lines to the vxproj file:

---
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <Optimization>Full</Optimization>
    </ClCompile>
  </ItemDefinitionGroup>
---

Cheers & thanks,
-Floh.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to