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

后端 未结 3 1301
后悔当初
后悔当初 2020-12-07 08:42

One way to get cmake to build x86 on Windows with Visual Studio is like so:

  1. Start Visual Studio Command prompt for x86
  2. Run cmake: cmake -G \"NMa
3条回答
  •  旧时难觅i
    2020-12-07 09:10

    try use CMAKE_GENERATOR_PLATFORM

    e.g.

    // x86
    cmake -DCMAKE_GENERATOR_PLATFORM=x86 . 
    
    // x64
    cmake -DCMAKE_GENERATOR_PLATFORM=x64 . 
    

提交回复
热议问题