linux:

方法一(选项):option(USE_32BITS "Compile for 32bits processors(linux only)" OFF)

方法二(命令):CMake .. -DUSE_32BITS=1  (可以写到make_solution.sh 中)

CMakelist.txt: 

if(USE_32BITS)
 message(STATUS "using 32bits")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")

else()
endif(USE_32BITS)


windows:

以下可以写到make_solution.bat中

x86: 

@echo off
::
:: Run this batch file to create Visual studio solution file for this project.
:: Seet the cmake documentation for other generator targets
::
cmake -G "Visual Studio 10" ../.. && cmake-gui ../..


x64:

@echo off
::
:: Run this batch file to create Visual studio solution file for this project.
:: Seet the cmake documentation for other generator targets
::
cmake -G "Visual Studio 10 Win64" ../.. && cmake-gui ../..

GitHub 加速计划 / li / linux-dash
7
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:6 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐