muparser CMake logic may not find OpenMP headers
Summary
external/muparser/CMakeLists.txt
sets ENABLE_OPENMP
to ${GMX_OPENMP}
, which will set the MUP_USE_OPENMP
define used in muParserBase.cpp
to determine whether to try to #include <omp.h>
.
However, the muparser
CMake target is not configured to use any of the other logic that the gromacs targets use to find OpenMP details.
This means that muparser may fail to compile while the rest of gromacs compiles (when omp.h
is not available through some global mechanism).
Possible fixes
The recommended fix would be to target_link_libraries(muparser PRIVATE OpenMP::OpenMP_CXX)
.
I'm not sure whether this should be done in src/external/muparser/CMakeLists.txt
or whether that will cause problems merging updates.