mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
remove optimize and debug build options because they are redudant w/ cmake_build_type
This commit is contained in:
parent
73ba908f1f
commit
32da4f2504
1 changed files with 5 additions and 10 deletions
|
|
@ -27,12 +27,12 @@ endif()
|
|||
|
||||
option(openmp "Enable shared-memory parallelism with OpenMP" ON)
|
||||
option(profile "Compile with profiling flags" OFF)
|
||||
option(debug "Compile with debug flags" OFF)
|
||||
option(optimize "Turn on all compiler optimization flags" OFF)
|
||||
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}")
|
||||
|
||||
#===============================================================================
|
||||
# MPI for distributed-memory parallelism
|
||||
#===============================================================================
|
||||
|
|
@ -134,18 +134,13 @@ endif()
|
|||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
list(APPEND cxxflags -O2)
|
||||
if(debug)
|
||||
list(REMOVE_ITEM cxxflags -O2)
|
||||
list(APPEND cxxflags -g -O0)
|
||||
if (NOT ${CMAKE_BUILD_TYPE})
|
||||
add_compile_options(-O2)
|
||||
endif()
|
||||
|
||||
if(profile)
|
||||
list(APPEND cxxflags -g -fno-omit-frame-pointer)
|
||||
endif()
|
||||
if(optimize)
|
||||
list(REMOVE_ITEM cxxflags -O2)
|
||||
list(APPEND cxxflags -O3)
|
||||
endif()
|
||||
if(coverage)
|
||||
list(APPEND cxxflags --coverage)
|
||||
list(APPEND ldflags --coverage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue