set default build configuration to release

This commit is contained in:
Kalin Kiesling 2022-03-21 15:39:31 -05:00
parent 32da4f2504
commit fcf25b5aba

View file

@ -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()