我正在尝试将 cmake 配置为分别构建 32 位和 64 位...
到目前为止 64 位很容易,因为我只需要添加 -A x64
cmake -G "Visual Studio 16 2019" -A x64
但我无法设置 32 位拱门。官方文档建议 -A Win32 或 -T host=x86
https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html
即使使用它们我也无法设置 x86 主机
我试过的:
cmake -G "Visual Studio 16 2019" -DCMAKE_GENERATOR_PLATFORM=x86
cmake -G "Visual Studio 16 2019" -A Win32
cmake -G "Visual Studio 16 2019" -A Win32 -T host=x86
cmake -G "Visual Studio 16 2019" -A Win32 host=x86
没有任何效果,这是我一直在获取的日志...
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.25.28612.0
-- The CXX compiler identification is MSVC 19.25.28612.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe