Reputation: 1044
First a bit of background:
I have an existing cmake project that uses the Visual Studio 12 generator. In Visual Studio it is possible to specify build configuration on a per project basis. EG. The Solution is set to build Debug, but one project is set to build Release. For the application that I am working on, there is a dependency that deals with very large files, and in a debug build, this dependency not only runs very slow, but also hits the memory limit on 32 bit systems (Please do no suggest fixing the memory usage as a solution because that is not feasible in the short term). This project only has one developer, so other team members do not actively debug it, the project however, is a dependency for many other parts of the application, so I would like just this project to build in release mode. I can manually specify this option through visual studio, but I would like it to be the default build functionality.
Real Question:
How do I specify project level build configurations for cmake's Visual Studio Generator?
Upvotes: 2
Views: 793
Reputation: 2035
You can tell cmake during configuration time the type of the build with CMAKE_BUILD_TYPE, for example:
cmake -DCMAKE_BUILD_TYPE=Release ..
Upvotes: -3