summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHans Johnson <hans-johnson@uiowa.edu>2016-07-27 07:44:13 -0500
committerHans Johnson <hans-johnson@uiowa.edu>2016-07-27 08:00:59 -0500
commit6568f9adb58c79db8a21aaf4a7c6dbf076c887eb (patch)
treebab8215f8a17a76f9260ed77911f6d3536583fd9 /CMakeLists.txt
parent094201f4063d62d41363dd869a4d6e64cb987fde (diff)
downloadlapack-6568f9adb58c79db8a21aaf4a7c6dbf076c887eb.tar.gz
lapack-6568f9adb58c79db8a21aaf4a7c6dbf076c887eb.tar.bz2
lapack-6568f9adb58c79db8a21aaf4a7c6dbf076c887eb.zip
ENH: Set default build type to "Release"
One of the most common reasons for using lapack & blas is to provide efficient computations. In my experience of working with newcomers to software bulding, I find that their first experience (and often their first year of experience) is with the most default build possible. It is very common that the first impressions of the software are based on whatever is produced by "mkdir –p PKG-build; cmake ../PKG; make". This proposal aims to improve initial impressions of the package by making the defaults such that the "mkdir –p PKG-build; cmake ../PKG; make" builds PKG in "Release" mode. Rational for Release: It has more support in differnt IDE's by default. As a default it should be the supportive of those with little or no software development experience. Those developers who need debugging information will likely have the experience needed to know how to change from the default. Developers should be smart enough to build with Debug, but the typical new user is often not educated enough to change to Release.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21cc5477..0f235537 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,13 @@
cmake_minimum_required(VERSION 2.8.10)
+
+# Set a default build type if none was specified
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ message(STATUS "Setting build type to 'Release' as none was specified.")
+ set(CMAKE_BUILD_TYPE Release 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()
+
project(LAPACK Fortran)
set(LAPACK_MAJOR_VERSION 3)