Skip to content

Commit

Permalink
CTest: fix bug with WarpX_APP=OFF and WarpX_PYTHON=ON (ECP-WarpX#…
Browse files Browse the repository at this point in the history
…5421)

Our `CMakeLists` to set up the `ctest` executable had a logic error when
`WarpX_APP=OFF` and `WarpX_PYTHON=ON`, in that it was trying to install
executable tests without an executable application.

The error message looked something like
```console
  Error evaluating generator expression:
    $<TARGET_FILE:app_3d>
  No target "app_3d"
```
  • Loading branch information
EZoni authored Oct 29, 2024
1 parent fcd5a09 commit 026e093
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ function(add_warpx_test
return()
endif()

# cannot run executable tests w/o WarpX executable application
if(NOT python AND NOT WarpX_APP)
return()
endif()

# set MPI executable
set(THIS_MPI_TEST_EXE
${MPIEXEC_EXECUTABLE}
Expand Down

0 comments on commit 026e093

Please sign in to comment.