cmake windows x64 构建

标签 cmake cmake-gui

有没有办法使用 cmake gui 指定 x64 构建,因为默认情况下 Windows 上的 cmake 创建 32 位 Visual Studio 解决方案。

从命令行,人们说这样做:

C:\projectx\build> cmake ..\make -G "Visual Studio 10 Win64"

但是如何从 cmake windows gui 获取命令行参数?

参见:

http://www.saoe.net/blog/778/

How to build x86 and/or x64 on Windows from command line with CMAKE?

cmake -G Ninja on windows specify x64

最佳答案

我发现执行此操作的唯一方法是删除输出文件夹,然后它允许您在首次配置 cmake 项目时选择 Visual Studio 10 Win64。确保您在下拉列表中选择了正确的项目。

关于cmake windows x64 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51350947/

相关文章:

c++ - CMake : CMAKE_MAKE_PROGRAM is not set

c++ - 无法将库与 cmake 中的测试二进制文件链接

ubuntu - 用于 Linux 的 CMake GUI 在哪里?

android - 如何为每个 Android ABI 设置产品风格的 CmakeLists 路径?

c++ - cmake 和 GenerateExportHeader

opencv - 在树莓派上使用cmake构建opencv时出错

linux - Qt5库被误删

c++ - OpenCV 3.2.0 无法访问 xfeatures2d 中的 SURF/SIFT

c++ - 如何使用目标接口(interface)将编译选项添加到 CMake FetchContent 依赖项

c++ - 跨平台项目中的 Eigen 错误