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