From 1c014a6dd8a9b538f50fa82165d52dbe4a374169 Mon Sep 17 00:00:00 2001 From: Chuck Atkins <chuck.atkins@kitware.com> Date: Mon, 3 Apr 2017 16:05:43 -0400 Subject: [PATCH] Default to debug build --- CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad738dbe9..bbf244496 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,11 @@ endif() # Top level options #------------------------------------------------------------------------------# +# Default to a debug build if not specified +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE) +endif() + # Force C++11 set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED True) @@ -62,7 +67,7 @@ endif() option(ADIOS_USE_MPI "Enable the MPI version of ADIOS" ON) if(ADIOS_USE_MPI) -# Workaround for OpenMPI forcing th elink of C++ bindings + # Workaround for OpenMPI forcing th elink of C++ bindings add_definitions(-DOMPI_SKIP_MPICXX) endif() option(ADIOS_USE_BZip2 "Enable support for BZip2 transforms" ON) @@ -72,8 +77,9 @@ option(ADIOS_USE_DataMan "Enable support for the DataMan engine" OFF) #------------------------------------------------------------------------------# # Third party libraries #------------------------------------------------------------------------------# -option(ADIOS_BUILD_TESTING "Build ADIOS tests" OFF) -set(BUILD_TESTING ${ADIOS_BUILD_TESTING} CACHE INTERNAL "") +option(ADIOS_BUILD_TESTING "Build ADIOS tests" ON) +set(BUILD_TESTING ${ADIOS_BUILD_TESTING}) +mark_as_advanced(BUILD_TESTING) include(CTest) add_subdirectory(thirdparty) @@ -117,10 +123,11 @@ message("") message(" Installation prefix: ${CMAKE_INSTALL_PREFIX}") message(" Features:") if(BUILD_SHARED_LIBS) - message(" Type: shared") + message(" Library Type: shared") else() - message(" Type: static") + message(" Library Type: static") endif() +message(" Build Type: ${CMAKE_BUILD_TYPE}") message(" Testing: ${BUILD_TESTING}") message(" MPI: ${ADIOS_USE_MPI}") message(" BZip2: ${ADIOS_USE_BZip2}") -- GitLab