简体   繁体   中英

How to set build type to 32 bit in Github actions for CMake C++ project

I need to have automated testing on github for a CMake C++ project. For this I want to use a 32 bit Windows machine (some of our packages are only in 32 bit), but I couldn't find an easy method to do this. I have tried to set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in the environment to the x86 compiler, but that did not do anything.

Is there a keyword that I can add either to github actions environment, or to the CMake so that my project does compile to a 32 bit program on github?

As stated in the comments from vre the cmake -A Win32 tag works on github: If you also want the host to be x86 run the following command: cmake -S SOURCEFOLDER -B BUILDFOLDER -T host=x86 -A Win32

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM