diff --git a/CMLibCotire.cmake b/CMLibCotire.cmake index af483ce..ed09326 100644 --- a/CMLibCotire.cmake +++ b/CMLibCotire.cmake @@ -1,6 +1,10 @@ include(cotire OPTIONAL) if(COMMAND cotire) - option(CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER "Enable precompiled headers" OFF) + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + option(CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER "Enable precompiled headers" ON) + else() + option(CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER "Enable precompiled headers" OFF) + endif() option(CMLIB_COTIRE_ADD_UNITY_BUILD "Enable unity build" OFF) endif()