Skip to content

Commit

Permalink
CI: build tests with -g1 compile option (#5443)
Browse files Browse the repository at this point in the history
Build and run CI tests with more debug information by adding the `-g1` compile option.
  • Loading branch information
EZoni authored Nov 7, 2024
1 parent f8a6701 commit 3d68665
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ jobs:
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 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
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} -g1")
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)
Expand Down

0 comments on commit 3d68665

Please sign in to comment.