I like having something like this.... defines CMAKE_BUILD_TYPE to be a droplist of choices...
---- if( NOT CMAKE_CONFIGURATION_TYPES ) set( CMAKE_CONFIGURATION_TYPES debug release ) endif( NOT CMAKE_CONFIGURATION_TYPES ) set( CMAKE_BUILD_TYPE release CACHE STRING "Cached cmake build type" ) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} ) ----- https://cmake.org/cmake/help/v3.0/variable/CMAKE_CONFIGURATION_TYPES.html On Mon, Jul 31, 2017 at 9:28 PM, Michael Ellery <mellery...@gmail.com> wrote: > > > > On Jul 31, 2017, at 8:48 PM, Florian Lindner <mailingli...@xgm.de> > wrote: > > > > Hello > > > > ccmake shows CMAKE_BUILD_TYPE as unset. From the compile commands it > looks like also nothing like Debug nor Release. > > > > Why is there no well-defined default set? How can I set a default? > > > > Thanks, > > Florian > > -- > > > > 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 > > > my recollection is that an unspecified build type results in a build that > has no optimizations and no debug symbols generated. I’m not sure what the > motivation for those default flags is. If you want to default to DEBUG, > something like this should work: > > if (NOT CMAKE_BUILD_TYPE) > set(CMAKE_BUILD_TYPE Debug) > endif() > > > -MIke > > -- > > 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 >
-- 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