cmake and make in Windows

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 install 

In windows, however, I cannot find similar commands that can do the same job. Usually, what is done is to build a .sln project first if Visual Studio is used, after that compile the .sln project and in the end run the INSTALL project. Will it be possible to make a release with several commands as it has been done in Linux. Many thanks.


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.

Need Your Help

How to represent different entities that have identical behavior?


I have several different entities in my domain model (animal species, let's say), which have a few properties each. The entities are readonly (they do not change state during the application lifeti...

How do I install an R package from source?

r package install r-faq

A friend sent me along this great tutorial on webscraping NYtimes with R. I would really love to try it. However, the first step is to installed a package called RJSONIO from source.