From 62e375c71c815ca12f859b8722db5dff12f0c897 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Sat, 4 Aug 2012 16:58:48 +0000 Subject: [PATCH] Make cmake default to "RelWithDebInfo" if not specified Recent releases has "none" target as the default, with is problematic. Also print the build type. --- fluidsynth/CMakeLists.txt | 5 +++++ fluidsynth/cmake_admin/report.cmake | 2 ++ 2 files changed, 7 insertions(+) diff --git a/fluidsynth/CMakeLists.txt b/fluidsynth/CMakeLists.txt index 4528524e..004b0220 100644 --- a/fluidsynth/CMakeLists.txt +++ b/fluidsynth/CMakeLists.txt @@ -265,6 +265,11 @@ if ( enable-debug ) "Choose the build type, options: Debug Release RelWithDebInfo" FORCE ) endif ( enable-debug ) +if ( NOT CMAKE_BUILD_TYPE ) + set ( CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "Choose the build type, options: Debug Release RelWithDebInfo" FORCE ) +endif ( NOT CMAKE_BUILD_TYPE ) + unset ( ENABLE_DEBUG CACHE ) unset ( DEBUG CACHE ) if ( CMAKE_BUILD_TYPE MATCHES "Debug" ) diff --git a/fluidsynth/cmake_admin/report.cmake b/fluidsynth/cmake_admin/report.cmake index e8565e85..c79ffd29 100644 --- a/fluidsynth/cmake_admin/report.cmake +++ b/fluidsynth/cmake_admin/report.cmake @@ -1,6 +1,8 @@ message( "\n**************************************************************\n" "Summary:" ) +message( "Build type: " ${CMAKE_BUILD_TYPE} ) + if ( LIBSNDFILE_SUPPORT ) if ( LIBSNDFILE_HASVORBIS ) message ( "libsndfile: yes (with ogg vorbis support)" )