Re: [petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Jed Brown
Please check out these resources. https://cmake.org/cmake/help/latest/module/FindPkgConfig.html https://gitlab.com/petsc/petsc/-/merge_requests/2367 Yann Jobic writes: > Hi all, > > I solved my problem, but i don't know if it's the right way to do it. > Libs.private is used in case of static

Re: [petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Yann Jobic
Hi all, I solved my problem, but i don't know if it's the right way to do it. Libs.private is used in case of static linking. So I added: execute_process ( COMMAND pkg-config PETSc --libs --static OUTPUT_VARIABLE STATIC_LIBS) string(STRIP ${STATIC_LIBS} STATIC_LIBS) message("Libs static : "

[petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Yann Jobic
Hi all, I'm trying to create a correct CMakeLists.txt in order to compile a petsc program. I can compile my code, but i cannot link it. I have this link command : /local/lib/openmpi/gcc8/4.0.3/bin/mpicc -g -rdynamic CMakeFiles/Test1.dir/src/dvm_dg1D_qff_2dV.c.o