Skip to content

Commit

Permalink
CMake: AMReX Advanced Options
Browse files Browse the repository at this point in the history
Avoid setting advanced AMReX options with `INTERNAL` as this implies
`FORCE` and we cannot overwrite them from the CMake GUIs.
  • Loading branch information
ax3l committed Jun 26, 2020
1 parent f44fde7 commit fd25b96
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cmake/dependencies/AMReX.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
macro(find_amrex)
if(WarpX_amrex_internal)
message(STATUS "Downloading AMReX ...")
include(FetchContent)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

Expand All @@ -10,11 +11,12 @@ macro(find_amrex)
endif()

if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
set(ENABLE_ASSERTIONS ON CACHE INTERNAL "")
set(ENABLE_FPE ON CACHE INTERNAL "")
set(ENABLE_ASSERTIONS ON CACHE BOOL "")
# note: floating-point exceptions can slow down debug runs a lot
set(ENABLE_FPE ON CACHE BOOL "")
else()
set(ENABLE_ASSERTIONS OFF CACHE INTERNAL "")
set(ENABLE_FPE OFF CACHE INTERNAL "")
set(ENABLE_ASSERTIONS OFF CACHE BOOL "")
set(ENABLE_FPE OFF CACHE BOOL "")
endif()

if(WarpX_COMPUTE STREQUAL CUDA)
Expand Down Expand Up @@ -52,7 +54,7 @@ macro(find_amrex)
set(ENABLE_FORTRAN_INTERFACES OFF CACHE INTERNAL "")
set(ENABLE_TUTORIALS OFF CACHE INTERNAL "")
set(ENABLE_PARTICLES ON CACHE INTERNAL "")
set(ENABLE_TINY_PROFILE ON CACHE INTERNAL "")
set(ENABLE_TINY_PROFILE ON CACHE BOOL "")

# ENABLE_SENSEI_IN_SITU
# we'll need this for Python bindings
Expand Down Expand Up @@ -95,7 +97,6 @@ macro(find_amrex)
mark_as_advanced(ENABLE_ACC)
mark_as_advanced(ENABLE_ASSERTIONS)
mark_as_advanced(ENABLE_AMRDATA)
mark_as_advanced(ENABLE_BACKTRACE) # BT files are written anyway
mark_as_advanced(ENABLE_BASE_PROFILE) # mutually exclusive to tiny profile
mark_as_advanced(ENABLE_CONDUIT)
mark_as_advanced(ENABLE_CUDA)
Expand Down
1 change: 1 addition & 0 deletions cmake/dependencies/PICSAR.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function(find_picsar)
if(WarpX_picsar_internal)
message(STATUS "Downloading PICSAR ...")
include(FetchContent)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

Expand Down
1 change: 1 addition & 0 deletions cmake/dependencies/openPMD.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function(find_openpmd)
if(WarpX_openpmd_internal)
message(STATUS "Downloading openPMD-api ...")
include(FetchContent)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

Expand Down

0 comments on commit fd25b96

Please sign in to comment.