Stephen Kelly wrote: >> As a workaround, you can enforce a value for CMAKE_BUILD_TYPE if on >> Windows >> and CMAKE_CONFIGURATION_TYPES is empty. If you enforce that, then you >> don't need to have the add_definition(-DQT_NO_DEBUG). >> > > Thanks for the pointer. I'll try setting that in the cache before calling > project() as described here: > > http://www.cmake.org/pipermail/cmake/2008-September/023808.html >
It didn't really work as described. I had to set the CMAKE_BUILD_TYPE after the call to project() or else MINGW seemed to not be defined, and I had to use if (NOT CMAKE_BUILD_TYPE) instead of if (NOT DEFINED CMAKE_BUILD_TYPE). I don't know if either of these things are themselves bugs or expected behaviour. if (MINGW) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel Coverage.") endif() endif() I'm happy to have this working now though :). I confirmed that changing it in cmake-gui works too. Thanks, Steve. _______________________________________________ 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