Visual Studio and Xcode are special cases where you can select in the IDE which type of build to run. If you are generating Makefiles then you need to set the CMAKE_BUILD_TYPE in cmake _before_ generating the makefiles. The easiest way to achieve this is to run ccmake and then select the CMAKE_BUILD_TYPE variable and either put in "Debug" or "Release".

CMake only supports one build type per build tree. So you will need to create 2 build trees, one for Debug and one for Release. Does this help?

--
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Mar 4, 2008, at 3:36 AM, Malhotra, Anupam wrote:

Hi



I read on the CMake wiki page that:



CMAKE_BUILD_TYPE is not initialized with a readable value at configuration time. This is because the user is free to select a build type at build time. Now in visual studio 6/visual studio 8 2005 we can select the build type by selecting Debug/Release after opening the workspace/solution. But how can the same be achieved in Linux? After my makefiles are generated using cmake, I want to first build the Debug mode and then the release mode. But how do I select which build type to select while building? Please advise.



Thanks and Regards

Anupam Malhotra



The information contained in this electronic mail transmission
may be privileged and confidential, and therefore, protected
from disclosure. If you have received this communication in
error, please notify us immediately by replying to this
message and deleting it from your computer without copying
or disclosing it.


_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to