You can set CMAKE_CONFIGURATION_TYPES to your own list of configurations (including limiting it to a single configuration) as long as you set it *before* the project command in your CMakeLists.txt file. This technique works with the Visual Studio and Xcode generators. See the following bug reports for reference.

   http://www.cmake.org/Bug/view.php?id=6788
   http://www.cmake.org/Bug/view.php?id=8914

I'm not sure why you would recommend anything related to CMAKE_BUILD_TYPE for the Visual Studio generators. I would be curious to know exactly how you are using it, because internally, CMAKE_BUILD_TYPE (to the best of my knowledge) is completely ignored by the Visual Studio generators. Any positive things happening in your project because of your use of it must be because of the way you use it in your CMakeLists files... I'm thinking it's probably only used at CMake time, unless you're passing it as args to custom commands or something... in which case, you'll be passing the same CMake configure time CMAKE_BUILD_TYPE value regardless of what config your end user chooses to build in Visual Studio. Which would be confusing at best.

VS and Xcode use a list of configurations, with the "active" configuration chosen at build time by the developer. Makefile and ninja systems use CMAKE_BUILD_TYPE -- VS and Xcode do not.


HTH,
David C.

--

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

Reply via email to