Re: [CMake] Visual Studio Cross Compile

2015-11-06 Thread Rashad M
Hello all,

I had tried what Michael was saying for another project with MinGW. And it
works perfectly. I even had HowTo on our wiki [1] to setup windows
development using cmake Eclipse IDE.

Note that the "xdk" archive I was saying was generated using cross compile
on linux

[1] http://wiki.orfeo-toolbox.org/index.php/OTB_development_on_Windows

On Mon, Nov 2, 2015 at 9:26 PM, J Decker  wrote:

> for windows platform using cmake, you just need mingw (mingw64 is
> probably better)
>
> On Mon, Nov 2, 2015 at 9:36 AM, Michael Jäntsch
>  wrote:
> > Hi,
> >
> > thanks for your replies. So it seems that Visual Studio is generally not
> > a great idea for cross-compiling...
> > So eclipse and some make system it's gonna be then. Any suggestions what
> > works best? Coming from the Linux world, I obviously use Unix make, but
> > there is also Ninja, nmake, ...?
> >
> > Michael
> >
> >
> > On 02.11.2015 15:51, Parag Chandra wrote:
> >> Hi Michael,
> >>
> >> Meant to reply sooner. As Nils pointed out, Visual Studio isn’t quite
> as flexible with cross-compilation as some other build systems. Having said
> that, it is indeed possible to cross-compile with Visual Studio, but there
> has to be a cross toolchain compatible with the IDE. Some examples of this
> include:
> >>
> >> Google’s Native Client - I have successfully targeted this environment
> with Visual Studio 2010 and Cmake;
> >>
> >> Windows Phone 8.1/10 - Have targeted this as well. While you may be
> thinking “that’s just another flavor of Windows”, it is nevertheless
> cross-compiling for ARM;
> >>
> >> Several options for Android development:
> >> Nvidia Tegra Studio;
> >> Visual Studio 2015 - Microsoft now offers first-party support within VS
> 2015;
> >> VS-Android;
> >>
> >> Commercial/paid add-ons that seem to support arbitrary GCC toolchains:
> >> Visual GDB - This one may be your best bet for what you are trying to
> accomplish. Supports Linux, Android, Raspberry Pi, etc. out of the box, and
> they claim to have an extensibility model to add your own platforms;
> >> WinGDB - similarly seems to support the GNU toolchain directly.
> >>
> >> Anyway, hopefully you get the idea. It is possible, but out of the box,
> you’re only going to be able to target Windows Phone and Android.
> >>
> >>
> >> Parag Chandra
> >> Senior Software Engineer, Mobile Team
> >> Mobile: +1.919.824.1410
> >>
> >>  
> >>
> >> Ionic Security Inc.
> >> 1170 Peachtree St. NE STE 400, Atlanta, GA 30309
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 10/29/15, 10:21 AM, "CMake on behalf of Michael Jaentsch" <
> cmake-boun...@cmake.org on behalf of michael.jaent...@in.tum.de> wrote:
> >>
> >>> Hi all,
> >>>
> >>> I have a question concerning Cross Compiling with CMake on Windows. I
> >>> would like to use Visual Studio but this is not a must. What I do is, I
> >>> setup a project for Cross Compiling on Linux and it works fine. Now I
> >>> want to transfer to Windows, so I set up a toolchain file which sets
> the
> >>> following variables:
> >>> CMAKE_SYSTEM_NAME
> >>> CMAKE_SYSTEM_PROCESSOR
> >>> CMAKE_FIND_ROOT_PATH
> >>> CMAKE_C_COMPILER
> >>> CMAKE_CXX_COMPILER
> >>>
> >>> and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2)
> >>> on Windows and tell it to generate a project for Visual Studio 10 and
> to
> >>> use the toolchain file. However, the output shows that it is trying to
> >>> use the Visual Studio compiler and then subsequently the build fails
> >>> because of some unkown compiler flags.
> >>>
> >>> So my question is: Is it even possible to do what I'm trying to do? Can
> >>> I cross compile with Visual Studio or do I have to use a different
> >>> generator? All I found in the documentation is that it is possible to
> >>> cross compile with a toolchain file...
> >>>
> >>> Cheers
> >>> Michael
> >>>
> >>>
> >>> --
> >>> Technische Universität München
> >>> Michael Jäntsch
> >>> Fakultät für Informatik
> >>> Robotics and Embedded Systems
> >>> Parkring 13
> >>> 85748 Garching bei München
> >>> michael.jaent...@in.tum.de
> >>> www6.in.tum.de
> >>> --
> >>>
> >>> 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
> >
> > --
> > Technische Universität München
> > Michael Jäntsch
> > Fakultät für Informatik
> > Robotics and Embedded Systems
> 

Re: [CMake] Visual Studio Cross Compile

2015-11-02 Thread Parag Chandra
Hi Michael,

Meant to reply sooner. As Nils pointed out, Visual Studio isn’t quite as 
flexible with cross-compilation as some other build systems. Having said that, 
it is indeed possible to cross-compile with Visual Studio, but there has to be 
a cross toolchain compatible with the IDE. Some examples of this include:

Google’s Native Client - I have successfully targeted this environment with 
Visual Studio 2010 and Cmake;

Windows Phone 8.1/10 - Have targeted this as well. While you may be thinking 
“that’s just another flavor of Windows”, it is nevertheless cross-compiling for 
ARM;

Several options for Android development:
Nvidia Tegra Studio;
Visual Studio 2015 - Microsoft now offers first-party support within VS 2015;
VS-Android;

Commercial/paid add-ons that seem to support arbitrary GCC toolchains:
Visual GDB - This one may be your best bet for what you are trying to 
accomplish. Supports Linux, Android, Raspberry Pi, etc. out of the box, and 
they claim to have an extensibility model to add your own platforms;
WinGDB - similarly seems to support the GNU toolchain directly.

Anyway, hopefully you get the idea. It is possible, but out of the box, you’re 
only going to be able to target Windows Phone and Android.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

  

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309













On 10/29/15, 10:21 AM, "CMake on behalf of Michael Jaentsch" 
 wrote:

>Hi all,
>
>I have a question concerning Cross Compiling with CMake on Windows. I 
>would like to use Visual Studio but this is not a must. What I do is, I 
>setup a project for Cross Compiling on Linux and it works fine. Now I 
>want to transfer to Windows, so I set up a toolchain file which sets the 
>following variables:
>CMAKE_SYSTEM_NAME
>CMAKE_SYSTEM_PROCESSOR
>CMAKE_FIND_ROOT_PATH
>CMAKE_C_COMPILER
>CMAKE_CXX_COMPILER
>
>and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2) 
>on Windows and tell it to generate a project for Visual Studio 10 and to 
>use the toolchain file. However, the output shows that it is trying to 
>use the Visual Studio compiler and then subsequently the build fails 
>because of some unkown compiler flags.
>
>So my question is: Is it even possible to do what I'm trying to do? Can 
>I cross compile with Visual Studio or do I have to use a different 
>generator? All I found in the documentation is that it is possible to 
>cross compile with a toolchain file...
>
>Cheers
>Michael
>
>
>-- 
>Technische Universität München
>Michael Jäntsch
>Fakultät für Informatik
>Robotics and Embedded Systems
>Parkring 13
>85748 Garching bei München
>michael.jaent...@in.tum.de
>www6.in.tum.de
>-- 
>
>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
-- 

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

Re: [CMake] Visual Studio Cross Compile

2015-11-02 Thread J Decker
for windows platform using cmake, you just need mingw (mingw64 is
probably better)

On Mon, Nov 2, 2015 at 9:36 AM, Michael Jäntsch
 wrote:
> Hi,
>
> thanks for your replies. So it seems that Visual Studio is generally not
> a great idea for cross-compiling...
> So eclipse and some make system it's gonna be then. Any suggestions what
> works best? Coming from the Linux world, I obviously use Unix make, but
> there is also Ninja, nmake, ...?
>
> Michael
>
>
> On 02.11.2015 15:51, Parag Chandra wrote:
>> Hi Michael,
>>
>> Meant to reply sooner. As Nils pointed out, Visual Studio isn’t quite as 
>> flexible with cross-compilation as some other build systems. Having said 
>> that, it is indeed possible to cross-compile with Visual Studio, but there 
>> has to be a cross toolchain compatible with the IDE. Some examples of this 
>> include:
>>
>> Google’s Native Client - I have successfully targeted this environment with 
>> Visual Studio 2010 and Cmake;
>>
>> Windows Phone 8.1/10 - Have targeted this as well. While you may be thinking 
>> “that’s just another flavor of Windows”, it is nevertheless cross-compiling 
>> for ARM;
>>
>> Several options for Android development:
>> Nvidia Tegra Studio;
>> Visual Studio 2015 - Microsoft now offers first-party support within VS 2015;
>> VS-Android;
>>
>> Commercial/paid add-ons that seem to support arbitrary GCC toolchains:
>> Visual GDB - This one may be your best bet for what you are trying to 
>> accomplish. Supports Linux, Android, Raspberry Pi, etc. out of the box, and 
>> they claim to have an extensibility model to add your own platforms;
>> WinGDB - similarly seems to support the GNU toolchain directly.
>>
>> Anyway, hopefully you get the idea. It is possible, but out of the box, 
>> you’re only going to be able to target Windows Phone and Android.
>>
>>
>> Parag Chandra
>> Senior Software Engineer, Mobile Team
>> Mobile: +1.919.824.1410
>>
>>  
>>
>> Ionic Security Inc.
>> 1170 Peachtree St. NE STE 400, Atlanta, GA 30309
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 10/29/15, 10:21 AM, "CMake on behalf of Michael Jaentsch" 
>>  wrote:
>>
>>> Hi all,
>>>
>>> I have a question concerning Cross Compiling with CMake on Windows. I
>>> would like to use Visual Studio but this is not a must. What I do is, I
>>> setup a project for Cross Compiling on Linux and it works fine. Now I
>>> want to transfer to Windows, so I set up a toolchain file which sets the
>>> following variables:
>>> CMAKE_SYSTEM_NAME
>>> CMAKE_SYSTEM_PROCESSOR
>>> CMAKE_FIND_ROOT_PATH
>>> CMAKE_C_COMPILER
>>> CMAKE_CXX_COMPILER
>>>
>>> and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2)
>>> on Windows and tell it to generate a project for Visual Studio 10 and to
>>> use the toolchain file. However, the output shows that it is trying to
>>> use the Visual Studio compiler and then subsequently the build fails
>>> because of some unkown compiler flags.
>>>
>>> So my question is: Is it even possible to do what I'm trying to do? Can
>>> I cross compile with Visual Studio or do I have to use a different
>>> generator? All I found in the documentation is that it is possible to
>>> cross compile with a toolchain file...
>>>
>>> Cheers
>>> Michael
>>>
>>>
>>> --
>>> Technische Universität München
>>> Michael Jäntsch
>>> Fakultät für Informatik
>>> Robotics and Embedded Systems
>>> Parkring 13
>>> 85748 Garching bei München
>>> michael.jaent...@in.tum.de
>>> www6.in.tum.de
>>> --
>>>
>>> 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
>
> --
> Technische Universität München
> Michael Jäntsch
> Fakultät für Informatik
> Robotics and Embedded Systems
> Boltzmannstr. 3
> 85748 Garching bei München
> michael.jaent...@in.tum.de
> www6.in.tum.de
>
> --
>
> 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 
> 

Re: [CMake] Visual Studio Cross Compile

2015-11-02 Thread Michael Jäntsch
Hi,

thanks for your replies. So it seems that Visual Studio is generally not
a great idea for cross-compiling...
So eclipse and some make system it's gonna be then. Any suggestions what
works best? Coming from the Linux world, I obviously use Unix make, but
there is also Ninja, nmake, ...?

Michael


On 02.11.2015 15:51, Parag Chandra wrote:
> Hi Michael,
>
> Meant to reply sooner. As Nils pointed out, Visual Studio isn’t quite as 
> flexible with cross-compilation as some other build systems. Having said 
> that, it is indeed possible to cross-compile with Visual Studio, but there 
> has to be a cross toolchain compatible with the IDE. Some examples of this 
> include:
>
> Google’s Native Client - I have successfully targeted this environment with 
> Visual Studio 2010 and Cmake;
>
> Windows Phone 8.1/10 - Have targeted this as well. While you may be thinking 
> “that’s just another flavor of Windows”, it is nevertheless cross-compiling 
> for ARM;
>
> Several options for Android development:
> Nvidia Tegra Studio;
> Visual Studio 2015 - Microsoft now offers first-party support within VS 2015;
> VS-Android;
>
> Commercial/paid add-ons that seem to support arbitrary GCC toolchains:
> Visual GDB - This one may be your best bet for what you are trying to 
> accomplish. Supports Linux, Android, Raspberry Pi, etc. out of the box, and 
> they claim to have an extensibility model to add your own platforms;
> WinGDB - similarly seems to support the GNU toolchain directly.
>
> Anyway, hopefully you get the idea. It is possible, but out of the box, 
> you’re only going to be able to target Windows Phone and Android.
>
>
> Parag Chandra
> Senior Software Engineer, Mobile Team
> Mobile: +1.919.824.1410
>
>   
>
> Ionic Security Inc.
> 1170 Peachtree St. NE STE 400, Atlanta, GA 30309
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 10/29/15, 10:21 AM, "CMake on behalf of Michael Jaentsch" 
>  wrote:
>
>> Hi all,
>>
>> I have a question concerning Cross Compiling with CMake on Windows. I 
>> would like to use Visual Studio but this is not a must. What I do is, I 
>> setup a project for Cross Compiling on Linux and it works fine. Now I 
>> want to transfer to Windows, so I set up a toolchain file which sets the 
>> following variables:
>> CMAKE_SYSTEM_NAME
>> CMAKE_SYSTEM_PROCESSOR
>> CMAKE_FIND_ROOT_PATH
>> CMAKE_C_COMPILER
>> CMAKE_CXX_COMPILER
>>
>> and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2) 
>> on Windows and tell it to generate a project for Visual Studio 10 and to 
>> use the toolchain file. However, the output shows that it is trying to 
>> use the Visual Studio compiler and then subsequently the build fails 
>> because of some unkown compiler flags.
>>
>> So my question is: Is it even possible to do what I'm trying to do? Can 
>> I cross compile with Visual Studio or do I have to use a different 
>> generator? All I found in the documentation is that it is possible to 
>> cross compile with a toolchain file...
>>
>> Cheers
>> Michael
>>
>>
>> -- 
>> Technische Universität München
>> Michael Jäntsch
>> Fakultät für Informatik
>> Robotics and Embedded Systems
>> Parkring 13
>> 85748 Garching bei München
>> michael.jaent...@in.tum.de
>> www6.in.tum.de
>> -- 
>>
>> 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

-- 
Technische Universität München
Michael Jäntsch
Fakultät für Informatik
Robotics and Embedded Systems
Boltzmannstr. 3
85748 Garching bei München
michael.jaent...@in.tum.de
www6.in.tum.de

-- 

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

Re: [CMake] Visual Studio Cross Compile

2015-11-02 Thread Michael Jäntsch
Hi again, 

Is there nobody who can help me? I thought it would be a common thing to use 
cmake to cross compile!? Has nobody ever used visual studio to do so? 

Cheers
Michael 


Am 29. Oktober 2015 15:21:41 MEZ, schrieb Michael Jaentsch 
:
>Hi all,
>
>I have a question concerning Cross Compiling with CMake on Windows. I 
>would like to use Visual Studio but this is not a must. What I do is, I
>
>setup a project for Cross Compiling on Linux and it works fine. Now I 
>want to transfer to Windows, so I set up a toolchain file which sets
>the 
>following variables:
>CMAKE_SYSTEM_NAME
>CMAKE_SYSTEM_PROCESSOR
>CMAKE_FIND_ROOT_PATH
>CMAKE_C_COMPILER
>CMAKE_CXX_COMPILER
>
>and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2) 
>on Windows and tell it to generate a project for Visual Studio 10 and
>to 
>use the toolchain file. However, the output shows that it is trying to 
>use the Visual Studio compiler and then subsequently the build fails 
>because of some unkown compiler flags.
>
>So my question is: Is it even possible to do what I'm trying to do? Can
>
>I cross compile with Visual Studio or do I have to use a different 
>generator? All I found in the documentation is that it is possible to 
>cross compile with a toolchain file...
>
>Cheers
>Michael
>
>
>-- 
>Technische Universität München
>Michael Jäntsch
>Fakultät für Informatik
>Robotics and Embedded Systems
>Parkring 13
>85748 Garching bei München
>michael.jaent...@in.tum.de
>www6.in.tum.de
>-- 
>
>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

--
Sent from my mobile-- 

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

Re: [CMake] Visual Studio Cross Compile

2015-11-02 Thread Nils Gladitz

On 11/02/2015 12:41 PM, Michael Jäntsch wrote:

Hi again,

Is there nobody who can help me? I thought it would be a common thing 
to use cmake to cross compile!? Has nobody ever used visual studio to 
do so?


Visual Studio itself does not have compiler selection in the same sense 
as is available with e.g. Makefiles or Ninja.
It can not be directly told to use specific compiler paths (you will not 
find any compiler paths in the generated solutions/projects).


It does support "Platform Toolset"s which in manually created projects 
can be set/seen in the "General" project settings and in CMake generated 
projects can be set via the -T option [1].


I'd stick to Ninja or Makefiles for cross-compiles unless you are 
targeting something with pre-existing toolset support.
I think e.g. Android is supported via CMAKE_SYSTEM_NAME "Android" and 
NVIDIA Nsight Tegra integration [2].


Nils

[1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_GENERATOR_TOOLSET.html
[2] https://cmake.org/cmake/help/v3.3/release/3.1.html#nvidia-nsight-tegra
--

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


[CMake] Visual Studio Cross Compile

2015-10-29 Thread Michael Jaentsch

Hi all,

I have a question concerning Cross Compiling with CMake on Windows. I 
would like to use Visual Studio but this is not a must. What I do is, I 
setup a project for Cross Compiling on Linux and it works fine. Now I 
want to transfer to Windows, so I set up a toolchain file which sets the 
following variables:

CMAKE_SYSTEM_NAME
CMAKE_SYSTEM_PROCESSOR
CMAKE_FIND_ROOT_PATH
CMAKE_C_COMPILER
CMAKE_CXX_COMPILER

and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2) 
on Windows and tell it to generate a project for Visual Studio 10 and to 
use the toolchain file. However, the output shows that it is trying to 
use the Visual Studio compiler and then subsequently the build fails 
because of some unkown compiler flags.


So my question is: Is it even possible to do what I'm trying to do? Can 
I cross compile with Visual Studio or do I have to use a different 
generator? All I found in the documentation is that it is possible to 
cross compile with a toolchain file...


Cheers
Michael


--
Technische Universität München
Michael Jäntsch
Fakultät für Informatik
Robotics and Embedded Systems
Parkring 13
85748 Garching bei München
michael.jaent...@in.tum.de
www6.in.tum.de
--

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