Skip to content
Snippets Groups Projects
Unverified Commit 88af5589 authored by Tim Kaune's avatar Tim Kaune
Browse files

Add new workflow presets

Update README
Add template file for user presets
parent b1fec9e8
No related branches found
No related tags found
No related merge requests found
{
"version": 2,
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"minor": 25,
"patch": 0
},
"configurePresets": [
......@@ -45,15 +45,62 @@
}
],
"buildPresets": [
{
"name": "verbose",
"hidden": true,
"verbose": true
},
{
"name": "accelerate-lapacke32",
"inherits": [
"verbose"
],
"displayName": "LAPACKE 32bit build linking against Accelerate and installation",
"configurePreset": "accelerate-lapacke32",
"targets": [
"install"
]
},
{
"name": "accelerate-lapacke64",
"inherits": [
"verbose"
],
"displayName": "LAPACKE 64bit build linking against Accelerate ILP64 interface and installation",
"configurePreset": "accelerate-lapacke64",
"targets": [
"install"
]
}
],
"workflowPresets": [
{
"name": "accelerate-lapacke32",
"displayName": "LAPACKE 32bit build linking against Accelerate",
"configurePreset": "accelerate-lapacke32"
"displayName": "LAPACKE 32bit build linking against Accelerate and installation",
"steps": [
{
"type": "configure",
"name": "accelerate-lapacke32"
},
{
"type": "build",
"name": "accelerate-lapacke32"
}
]
},
{
"name": "accelerate-lapacke64",
"displayName": "LAPACKE 64bit build linking against Accelerate ILP64 interface",
"configurePreset": "accelerate-lapacke64"
"displayName": "LAPACKE 64bit build linking against Accelerate ILP64 interface and installation",
"steps": [
{
"type": "configure",
"name": "accelerate-lapacke64"
},
{
"type": "build",
"name": "accelerate-lapacke64"
}
]
}
]
}
{
"version": 6,
"include": [
"./CMakePresets.json"
],
"configurePresets": [
{
"name": "user-accelerate-lapacke32",
"inherits": [
"accelerate-lapacke32"
],
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "/opt/custom"
},
"displayName": "User LAPACKE 32bit configuration linking against Accelerate"
},
{
"name": "user-accelerate-lapacke64",
"inherits": [
"accelerate-lapacke64"
],
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "/opt/custom"
},
"displayName": "User LAPACKE 64bit configuration linking against Accelerate ILP64 interface"
}
],
"buildPresets": [
{
"name": "user-accelerate-lapacke32",
"inherits": [
"accelerate-lapacke32"
],
"displayName": "User LAPACKE 32bit build linking against Accelerate and installation",
"configurePreset": "user-accelerate-lapacke32"
},
{
"name": "user-accelerate-lapacke64",
"inherits": [
"accelerate-lapacke64"
],
"displayName": "User LAPACKE 64bit build linking against Accelerate ILP64 interface and installation",
"configurePreset": "user-accelerate-lapacke64"
}
],
"workflowPresets": [
{
"name": "user-accelerate-lapacke32",
"displayName": "User LAPACKE 32bit build linking against Accelerate and installation",
"steps": [
{
"type": "configure",
"name": "user-accelerate-lapacke32"
},
{
"type": "build",
"name": "user-accelerate-lapacke32"
}
]
},
{
"name": "user-accelerate-lapacke64",
"displayName": "User LAPACKE 64bit build linking against Accelerate ILP64 interface and installation",
"steps": [
{
"type": "configure",
"name": "user-accelerate-lapacke64"
},
{
"type": "build",
"name": "user-accelerate-lapacke64"
}
]
}
]
}
......@@ -144,43 +144,27 @@ via Homebrew or MacPorts):
- Fortran compiler (e. g. `gfortran` contained in the `gcc` package) to
make it through the Reference LAPACK configure script
### Configuration with CMake ###
### Workflow with CMake ###
Use the `accelerate-lapacke32` preset (or the `accelerate-lapacke64` preset for
the ILP64 interface) with CMake:
```shell
$ cmake --preset accelerate-lapacke32
$ cmake --workflow --preset accelerate-lapacke32
```
This will configure LAPACKE to be installed in your `~/.local` directory by
default. If you prefer a different install location (e. g. `/opt/custom`),
you can change it like this:
you can change it using a `CMakeUserPresets.json` file, for which a template
file is provided:
```shell
$ cmake --preset accelerate-lapacke32 -D "CMAKE_INSTALL_PREFIX=/opt/custom"
$ cmake --workflow --preset user-accelerate-lapacke32
```
I wouldn't recommend installing to `/usr/local` (used by Homebrew on Intel Macs)
or `/opt/local` (used by MacPorts).
### Build and install ###
When the configuration finished successfully (fingers crossed), you can build with the
same preset name (`accelerate-lapacke32` or `accelerate-lapacke64`):
```shell
$ cmake --build --preset accelerate-lapacke32 --verbose
```
If everything worked as intended, linking the library should be successful. Now,
you can install to the previously configured install prefix by building the
install target:
```shell
$ cmake --build --preset accelerate-lapacke32 --verbose --target install
```
### Using LAPACKE in another project ###
You can use your self-compiled LAPACKE library in other projects by importing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment