From fcf25b5aba599c372eeeeb44570ddbdd017f63e2 Mon Sep 17 00:00:00 2001 From: Kalin Kiesling Date: Mon, 21 Mar 2022 15:39:31 -0500 Subject: [PATCH] set default build configuration to release --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a047cc9a6..27a8f06ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,13 @@ option(coverage "Compile with coverage analysis flags" OFF) option(dagmc "Enable support for DAGMC (CAD) geometry" OFF) option(libmesh "Enable support for libMesh unstructured mesh tallies" OFF) -message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") +#=============================================================================== +# Set build configuration to Release if not set +#=============================================================================== + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() #=============================================================================== # MPI for distributed-memory parallelism @@ -134,10 +140,6 @@ endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) -if (NOT ${CMAKE_BUILD_TYPE}) - add_compile_options(-O2) -endif() - if(profile) list(APPEND cxxflags -g -fno-omit-frame-pointer) endif()