cburstedde / libsc

The "sc" auxiliary library
www.p4est.org/
GNU Lesser General Public License v2.1
36 stars 34 forks source link

CMake: redo check when "mpi" option changes #162

Closed scivision closed 9 months ago

scivision commented 9 months ago

This allows the user to toggle "mpi" on and off without completely clearing the build directory.

tim-griesbach commented 9 months ago

Thanks! I tried to use this branch to switch the CMake option mpi on and off in p4est with this branch as submodule, and now I am able to reconfigure mpi using ccmake. After the reconfiguration, the compilation fails because P4EST_ENABLE_MPI and P4EST_ENABLE_MPIIO are not updated accordingly.

/home/griesbac/workspace/p4est/src/p4est_base.h:39:2: error: #error "MPI configured differently in p4est and libsc"
   39 | #error "MPI configured differently in p4est and libsc"
      |  ^~~~~

Would it be possible that these macros are updated automatically during a reconfiguration of mpi?

scivision commented 9 months ago

p4est would need to incorporate the libsc commits here i.e. after this libsc PR is merged

cburstedde commented 9 months ago

Thanks let's try this with p4est.

scivision commented 9 months ago

@tim-griesbach this is fixed by https://github.com/cburstedde/p4est/pull/279