cmake and make in Windows

前端 未结 2 1043
后悔当初
后悔当初 2021-02-04 10:09

I understand that in linux cmake, make and make install can be combined together to produce a release. For example:

cmake -DCMAKE_BUILD_TYPE=Release ..
make
make         


        
2条回答
  •  我在风中等你
    2021-02-04 10:51

    You can use msbuild instead of make:

    cmake -G"Visual Studio 12" ..
    msbuild /P:Configuration=Release INSTALL.vcxproj
    

    or you could use CMake's --build argument:

    cmake -G"Visual Studio 12" ..
    cmake --build . --target INSTALL --config Release
    

    If you need the equivalent of the make command with no args (i.e. make all) you would build the ALL_BUILD target as well, but this is built as part of the INSTALL target anyway.

提交回复
热议问题