From 1ec98b4496d6bb3046cb6d8f3a39814930ed846f Mon Sep 17 00:00:00 2001 From: James Price Date: Mon, 4 Jul 2016 15:46:00 +0100 Subject: [PATCH] Use 'Release' if CMAKE_BUILD_TYPE not specified --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index aeb2960..91b4f5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,12 @@ set(gpu-stream_VERSION_MINOR 0) configure_file(common.h.in common.h) include_directories(${CMAKE_BINARY_DIR}) +# Use 'Release' if no build type specified +if (NOT CMAKE_BUILD_TYPE) + message("No CMAKE_BUILD_TYPE specified, defaulting to 'Release'") + set(CMAKE_BUILD_TYPE "Release") +endif() + # If using the Cray compiler, manually add the C++11 flag because setting the # standard through CMake as above doesn't set this flag with Cray if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")