[CMake] toolchain file - cross-compiling windows-amd64->windows-x86

Guy Mac guymac at gmail.com
Tue Sep 17 14:09:38 EDT 2019


AFAIK you can set the generator in a CMakeSettings.json file if you are 
using MSVC.

https://docs.microsoft.com/en-us/cpp/build/cmakesettings-reference?view=vs-2019

On 9/17/2019 10:00 AM, Juan Sanchez wrote:
> Hello,
>
> My impression that targeting 32 bit depends on what generator you are 
> using.
> https://cmake.org/cmake/help/git-stage/generator/Visual%20Studio%2015%202017.html
>
> It looks like cmake now has:
>
>   * |cmake -G "Visual Studio 15 2017" -A Win32|
>   * |cmake -G "Visual Studio 15 2017" -A x64|
>
> It used to be that the default target platform was Win32, and  you had 
> to specify Win64 in the generator string to target a 64 bit build.  
> For example with Visual Studio 2015
>
> https://cmake.org/cmake/help/git-stage/generator/Visual%20Studio%2014%202015.html
>
> For compatibility with CMake versions prior to 3.1, one may specify a 
> target platform name optionally at the end of the generator name. This 
> is supported only for:
>
> |Visual Studio 14 2015 Win64|
>     Specify target platform |x64|.
> |Visual Studio 14 2015 ARM|
>     Specify target platform |ARM|.
>
>
>
> Regards,
>
> Juan
>
>
> On Tue, Sep 17, 2019 at 7:18 AM Joao Pedro Abreu De Souza 
> <jp_abreu at id.uff.br <mailto:jp_abreu at id.uff.br>> wrote:
>
>     cl from visual studio 2017.
>
>     Em ter, 17 de set de 2019 03:26, Stéphane Ancelot
>     <sancelot at numalliance.com <mailto:sancelot at numalliance.com>> escreveu:
>
>         Hi,
>
>         That first depends on which compiler you will use ?
>
>         Regards,
>
>         S.Ancelot
>
>         Le 16/09/2019 à 22:32, Joao Pedro Abreu De Souza a écrit :
>>         Hi guys. I am trying to generate,using cmake, a executable
>>         with target Windows 32 bits using Windows 64 bits, but cannot
>>         find a standard toolchain file (I find to Linux, to Android,
>>         but can't find to Windows 32 bits) to build. Do you know some
>>         repository of toolchain files that has Windows 32 bits from
>>         Windows 64 bits? Or maybe someone has a standard toolchain
>>         file to this type of thing.
>>
>>         Thanks in advance.
>>
>     -- 
>
>     Powered by www.kitware.com <http://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:
>     https://cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190917/7b53fefb/attachment-0001.html>


More information about the CMake mailing list