Clemens Arth wrote:
Hi,
I got a rather simple question. To add some special optimization flags
to a custom build for one of our projects, I followed the guide to add
a custom build type to my project using the example found here:
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_extend_the_build_modes_with_a_custom_made_one_.3F
I simply copy-pasted the code found there into a separate file and did
the following:
project(Dummy)
include(maintainermode.cmake)
add_library(dummylib dummy.cpp)
To build it I run:
>>cmake -DCMAKE_BUILD_TYPE=Maintainer ..
and
>>make
Although everything seems to be correct, I can't get the stuff
compiled with the new mode - it definitely adds the configuration, but
I simply cannot build it like Release or Debug. It always sticks back
to Debug.
Did I miss something here?
Ok, to answer myself I obviously missed something. I think the solution
to this is to change
# Update the documentation string of CMAKE_BUILD_TYPE for GUIs
SET( CMAKE_BUILD_TYPE "" CACHE STRING
"Choose the type of build, options are: None Debug Release
RelWithDebInfo MinSizeRel Maintainer."
FORCE )
to
# Update the documentation string of CMAKE_BUILD_TYPE for GUIs
SET( CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING
"Choose the type of build, options are: None Debug Release
RelWithDebInfo MinSizeRel Maintainer."
FORCE )
However, is this known to break something else?
Clemens
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake