File: README.md

package info (click to toggle)
lapackpp 2024.10.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,500 kB
  • sloc: cpp: 80,181; ansic: 27,660; python: 4,838; xml: 182; perl: 99; makefile: 53; sh: 23
file content (53 lines) | stat: -rw-r--r-- 1,570 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
LAPACK++ Example
================================================================================

This is designed as a minimal, standalone example to demonstrate
how to include and link with LAPACK++. This assumes that LAPACK++ has
been compiled and installed. There are two options:

## Option 1: Makefile

The Makefile must know the compiler used to compile LAPACK++,
CXXFLAGS, and LIBS. Set CXX to the compiler, either in your environment
or in the Makefile. For the flags, there are two more options:

a. Using pkg-config to get CXXFLAGS and LIBS for LAPACK++ (recommended).
pkg-config must be able to locate the lapackpp package. If it is installed
outside the default search path (see `pkg-config --variable pc_path pkg-config`),
it should be added to `$PKG_CONFIG_PATH`. For instance, if it is installed
in /opt/slate:

    export PKG_CONFIG_PATH=/opt/slate/lib/pkgconfig  # for sh
    setenv PKG_CONFIG_PATH /opt/slate/lib/pkgconfig  # for csh

b. Hard-code CXXFLAGS and LIBS for LAPACK++ in the Makefile.

Then, to build and run `example_potrf` using the
Makefile, run:

    make
    make test

## Option 2: CMake

CMake must know the compiler used to compile LAPACK++. Set CXX to the
compiler, in your environment.

Create a build directory:

    mkdir build && cd build

If LAPACK++ is installed outside the default search path, tell cmake
where, for example, in /opt/slate:

    cmake -DCMAKE_PREFIX_PATH=/opt/slate ..

Otherwise, simply run:

    cmake ..

Then, to build and run `example_potrf` using the
resulting Makefile, run:

    make
    make test