On 21.08.2014 13:27, Mauro Ziliani wrote:
Hi all.
I came from bakefile 0.2.9 generator.
In my projects I defined the default build type as debug.
So when I run
make
my project will build in debug mode.
When I need to produce the final executable i have to run
make BUILD=release
and I'll get the final release executable.
How can I achieve the same behavious in CMake (3.0)?
CMake has multi- (e.g. Visual Studio, XCode) and single-configuration
(e.g. Makefile, Ninja) generators.
With multi-configuration generators you pick the build type at build
time (build tool invocation).
With single-configuration generators you pick the build type at
configuration time (cmake invocation).
Assuming one of the single-configuration Makefile generators you tell
cmake about the build type with e.g.
-DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=Release.
I would maintain one out of source tree build directory per
configuration of interest.
Nils
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake