Merge branch 'spack' into polishing-for-beta
This commit is contained in:
commit
da623419a9
|
@ -21,7 +21,7 @@ if (DAMASK_SOLVER STREQUAL "GRID")
|
|||
elseif (DAMASK_SOLVER STREQUAL "MESH")
|
||||
project (damask-mesh HOMEPAGE_URL https://damask.mpie.de LANGUAGES Fortran C)
|
||||
else ()
|
||||
message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined")
|
||||
message (FATAL_ERROR "Invalid solver: DAMASK_SOLVER=${DAMASK_SOLVER}")
|
||||
endif ()
|
||||
add_definitions ("-D${DAMASK_SOLVER}")
|
||||
|
||||
|
@ -35,6 +35,7 @@ add_definitions (-DDAMASKVERSION="${DAMASK_VERSION}")
|
|||
if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||
set (CMAKE_BUILD_TYPE "RELEASE")
|
||||
endif ()
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
|
||||
|
||||
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
||||
|
@ -44,9 +45,15 @@ if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
|||
elseif (CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
||||
set (PARALLEL "ON")
|
||||
set (OPTI "DEFENSIVE")
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "DEBUGRELEASE")
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -DDEBUG")
|
||||
set (PARALLEL "ON")
|
||||
set (OPTI "DEFENSIVE")
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "PERFORMANCE")
|
||||
set (PARALLEL "ON")
|
||||
set (OPTI "AGGRESSIVE")
|
||||
else ()
|
||||
message (FATAL_ERROR "Invalid build type: CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
|
||||
endif ()
|
||||
|
||||
# $OPTIMIZATION takes precedence over $BUILD_TYPE defaults
|
||||
|
|
Loading…
Reference in New Issue