From 7c589bb661c77b9ed2e1f52e8697af8fafc5df79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 11 Mar 2015 11:30:14 +0000 Subject: [PATCH] Default to release build type if not selected via cmake. Only on non Win platforms git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1241 fdac6126-5c0c-442c-9429-916003d36597 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4638f59c..032b4bbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,11 @@ if("${PROJECT_NAME}" STREQUAL "") project (OpenMesh) endif() +if (NOT WIN32 AND NOT CMAKE_BUILD_TYPE) + message(STATUS "No build type selected, default to Release") + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) +endif() + # add our macro directory to cmake search path set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set (CMAKE_DEBUG_POSTFIX "d") -- GitLab