On 22. Jul, 2010, at 9:55 , norulez wrote: > I want to set the debug prefix on windows when I build in debug mode, so I > check if Debug is in CMAKE_BUILD_TYPE. > I use both, Visual Studio and the MinGW compiler > > Am 22.07.2010 um 08:53 schrieb Michael Wild <[email protected]>: > >> >> On 22. Jul, 2010, at 8:38 , norulez wrote: >> >>> How can I find out which build type is used? Because if I didn't define >>> CMAKE_BUILD_TYPE, this variable is uninitialized. >> >> That depends. For single-configuration generators (i.e. Makefile based), the >> user has to set CMAKE_BUILD_TYPE. If it is empty, no special configuration >> options will be used. For multi-configuration generators (VisualStudio, >> Xcode, etc.), you simply can't know at CMake-time, since the user can change >> the selection before hitting the build button. >> >> What is it that you want to achieve? Probably there's a better way... >> >> Michael >>
Well, if you set the variables CMAKE_<CONFIG>_POSTFIX or set the target property <CONFI>_POSTFIX (where <CONFIG> is DEBUG, RELEASE, etc.), CMake does everything automagically. You don't have to know whether in which configuration you are building, because CMake is going to select the appropriate suffix by itself. HTH Michael _______________________________________________ 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
