diff --git a/.travis.sh b/.travis.sh index 0c39d69f..4dc63da7 100755 --- a/.travis.sh +++ b/.travis.sh @@ -9,9 +9,10 @@ if [ "$ANALYZE" = "true" ] ; then exit $RET else set -e + export VERBOSE=1 mkdir build && cd build cmake -G "Unix Makefiles" .. make - make install DESTDIR=/tmp/whatever + make install/strip DESTDIR=/tmp/whatever make package fi diff --git a/CMakeLists.txt b/CMakeLists.txt index e506d31e..a736e068 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,17 @@ project("Woof" HOMEPAGE_URL "https://github.com/fabiangreffrath/woof" LANGUAGES C) +# Set a default build type if none was specified +set(default_build_type "RelWithDebInfo") +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + # Prevent in-tree builds. if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "In-tree builds are not supported.")