Don't set BUILD_OMP. libomp is correctly found and used when building with clang anyway.
MPI needs C11 compiler.
Differential D21994
science/lammps: fix build on GCC architectures pkubaj on Oct 12 2019, 4:26 PM. Authored by Tags None Referenced Files
Subscribers None
Details
Don't set BUILD_OMP. libomp is correctly found and used when building with clang anyway. MPI needs C11 compiler.
Diff Detail
Event Timeline
Comment Actions It breaks GCC: https://github.com/lammps/lammps/pull/1483 Clang can find libomp anyway without this switch and use it.
Comment Actions Then think about switching it to use CMAKE_DISABLE_FIND_PACKAGE_OpenMP. -- if you remove the toggle then you can just as well remove the option as it will not do anything sensible in an unclean environment, where the dependency may be present even though the option is off. Comment Actions It still looks slightly wrong to me. Now on GCC wenn you set the option ON you'll disable finding it, but when you set the Option OFF it will try to execute the find call, and again might find it when installed. Imho you should disable the find call on GCC no matter what the option value, or mark option=on broken on GCC. But...If you are sure that this is what you want, then go ahead :) Comment Actions Make OPENMP option clang-only and add CMAKE_DISABLE_FIND_PACKAGE_OpenMP when using gcc.
Comment Actions Given you tested it, that looks good to me as a whole now (with that small nitpick above). |