diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 1d5127ae5a1..c84eae249b6 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -151,12 +151,19 @@ jobs: # display disk space usage df -h # configure - export AMReX_CMAKE_FLAGS="-DAMReX_ASSERTIONS=ON -DAMReX_TESTING=ON" - cmake -S . -B build \ - ${AMReX_CMAKE_FLAGS} \ - ${WARPX_CMAKE_FLAGS} \ - -DWarpX_TEST_CLEANUP=ON \ - -DWarpX_TEST_FPETRAP=ON + export AMReX_CMAKE_FLAGS=( + "-DAMReX_ASSERTIONS=ON" + "-DAMReX_TESTING=ON" + ) + export WARPX_TEST_FLAGS=( + "-DWarpX_TEST_CLEANUP=ON" + "-DWarpX_TEST_FPETRAP=ON" + "-DWarpX_TEST_DEBUG=ON" + ) + cmake -S . -B build \ + ${AMReX_CMAKE_FLAGS} \ + ${WARPX_CMAKE_FLAGS} \ + ${WARPX_TEST_FLAGS} # build cmake --build build -j 2 # display disk space usage diff --git a/CMakeLists.txt b/CMakeLists.txt index 66fe63230d9..1c4986f7fa0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,13 @@ mark_as_advanced(WarpX_TEST_CLEANUP) option(WarpX_TEST_FPETRAP "Run CI tests with FPE-trapping runtime parameters" OFF) mark_as_advanced(WarpX_TEST_FPETRAP) +# Advanced option to run CI tests with the -g compile option +option(WarpX_TEST_DEBUG "Run CI tests with the -g compile option" OFF) +mark_as_advanced(WarpX_TEST_DEBUG) +if(WarpX_TEST_DEBUG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") +endif() + set(WarpX_DIMS_VALUES 1 2 3 RZ) set(WarpX_DIMS 3 CACHE STRING "Simulation dimensionality <1;2;3;RZ>") list(REMOVE_DUPLICATES WarpX_DIMS)