jedbrown / cmake-modules

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

Can't find a working PETSc #11

Closed burgerga closed 9 years ago

burgerga commented 9 years ago

I tried to use the installed petsc (3.1) and one I compiled from source (3.6) but I can't get them to work. In both cases I get

-- Recognized PETSc install with single library for all packages -- Performing Test MULTIPASS_TEST_1_petsc_works_minimal -- Performing Test MULTIPASS_TEST_1_petsc_works_minimal - Failed -- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes -- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes - Failed -- Performing Test MULTIPASS_TEST_3_petsc_works_alllibraries -- Performing Test MULTIPASS_TEST_3_petsc_works_alllibraries - Failed -- Performing Test MULTIPASS_TEST_4_petsc_works_all -- Performing Test MULTIPASS_TEST_4_petsc_works_all - Failed -- PETSc could not be used, maybe the install is broken.

I am able to compile and run the examples in the petsc source.

burgerga commented 9 years ago

CMakeError.log: http://pastebin.com/FuyBE0Gh

jedbrown commented 9 years ago

You have a PETSc built with C compilers, yet you're asking for a (silly and not recommended) C++ feature. Either build PETSc --with-clanguage=C++ or don't ask for CHKERRXX.

burgerga commented 9 years ago

Thank you for your clarification, much appreciated. I am trying to get the Chaste software package compiling and their CMakeLists.txt contains find_package(PETSc REQUIRED COMPONENTS CXX), that must be a mistake then... I will take it up with the Chaste developers.