zoukankan      html  css  js  c++  java
  • 指定CMAKE构建32位/64位版本的程序

    • GCC (on Linux) and some other compilers, e.g Sun Studio. Set CFLAGS and CXXFLAGS to include -m32 (32-bit build) or -m64 (64-bit build).

    • Windows, Visual Studio generator .Use 64 bit generator ,e.g

      cmake -G "Visual Studio 10 Win64" path osourcedir

      to compile 64-bit (x64). Omit "Win64" in generator name, to build for 32 bit

    • Mac OS X. Use CMAKE_OSX_ARCHITECTURES CMake variable.

      cmake -DCMAKE_OSX_ARCHITECTURES=i386 /path/to/source/dir will compile 32 bit build

      cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 /path/to/source/dir will compile 64 bit.

      Finally, cmake "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" /path/to/source/dir will create 96-bit universal binaries :)

  • 相关阅读:
    哈夫曼树
    MongoDB
    Node.js 搭建Web
    Node.js
    HDFS编程
    scp
    MapRecude
    级数
    (转)MySQL百万级数据库优化
    ssh
  • 原文地址:https://www.cnblogs.com/youxiao/p/3240220.html
Copyright © 2011-2022 走看看