jedbrown / cmake-modules

CMake modules for some scientific libraries
BSD 2-Clause "Simplified" License
87 stars 54 forks source link

Fix PETSC_VERSION caching, fixes #28 #29

Closed ihnorton closed 6 years ago

ihnorton commented 6 years ago

PARENT_SCOPE and CACHE can't be used in the same call, presumably because cache is global. So cmake doesn't recognize those arguments, and instead sets the variable PETSC_VERSION to a list containing all the following arguments except PARENT_SCOPE (which does still apply). Perhaps a newer cmake version will give an error.

https://cmake.org/pipermail/cmake/2018-May/067465.html

ihnorton commented 6 years ago

cc @floli. Realized I had a PETSc build around from helping with Julia bindings a few years ago, so went ahead and tested the fix from the mailing list.