Hello,

I have a third party FindPETSc.cmake module:

https://github.com/jedbrown/cmake-modules/blob/master/FindPETSc.cmake

The problem I have, is that variable PETSC_VERSION is not set when cmake is run 
for a second time

https://github.com/jedbrown/cmake-modules/issues/28

What is best way to deal with that?

Can an entire function be cached, e.g. petsc_get_version or is adding CACHE to 
the set calls of PETSC_VERSION the best way?

Adding CACHE INTERNAL gives me error messages:

set (PETSC_VERSION 
"${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}" CACHE 
INTERNAL "PETSc
version" PARENT_SCOPE)


CMake Error at tools/cmake-modules/FindPETSc.cmake:314 (if):
  if given arguments:

    "3.8.4" "CACHE" "INTERNAL" "PETSc version" "VERSION_LESS" "3.1"

  Unknown arguments specified



Thanks!
Florian
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to