File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,10 @@ $ LIBS="-framework Accelerate" FFLAGS="-ff2c -fno-second-underscore" FCFLAGS="-f
286
286
287
287
## Using arpack-ng from your own codebase
288
288
289
+ The * .pc and * .cmake files provided by ` arpack-ng ` are only pointing to arpack libraries.
290
+ If you need other libraries (like MPI), you must add them alongside arpack (see CMake example below).
291
+ Examples are provided in ` tstCMakeInstall.sh ` and ` tstAutotoolsInstall.sh ` generated after running cmake/configure.
292
+
289
293
### With autotools
290
294
291
295
First, set ` PKG_CONFIG_PATH ` to the location in the installation directory where ` arpack.pc ` lies.
@@ -314,9 +318,12 @@ To use PARPACK in your Cmake builds, use `PARPACK::PARPACK` target:
314
318
315
319
``` cmake
316
320
FIND_PACKAGE(arpackng)
321
+ FIND_PACKAGE(MPI REQUIRED COMPONENTS Fortran)
317
322
ADD_EXECUTABLE(main main.f)
318
323
TARGET_INCLUDE_DIRECTORIES(main PUBLIC PARPACK::PARPACK)
319
324
TARGET_LINK_LIBRARIES(main PARPACK::PARPACK)
325
+ TARGET_INCLUDE_DIRECTORIES(main PUBLIC MPI::MPI_Fortran)
326
+ TARGET_LINK_LIBRARIES(main MPI::MPI_Fortran)
320
327
```
321
328
322
329
Note: Make sure to update ` CMAKE_MODULE_PATH ` env variable (otheriwse, ` find_package ` won't find arpack-ng cmake file).
You can’t perform that action at this time.
0 commit comments