diff --git a/.gitignore b/.gitignore index 5d9df6a..3fd2015 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ bin/ lib/ doc/ tmp/ +build/ # mac -.DS_Store \ No newline at end of file +.DS_Store diff --git a/README.md b/README.md index 71b53ce..ded029d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Updates to the original code include: * Some new features were added to support printing error messages and reporting iterations to the user. * The user can now specify the max and min `alpha` to use during the line search. * The user can supply a routine to compute the gradients of the objective function and constriants, or allow the code to estimate them using finite differences (backward, forward, or central). -* The documentation strings in the code have been converted to [FORD](https://github.com/cmacmackin/ford) format, allowing for [nicely formatted documentation](http://jacobwilliams.github.io/slsqp/) to be auto-generated. +* The documentation strings in the code have been converted to [FORD](https://github.com/Fortran-FOSS-Programmers/ford) format, allowing for [nicely formatted documentation](http://jacobwilliams.github.io/slsqp/) to be auto-generated. * A couple of bug fixes noted elsewhere have been applied. ### License @@ -34,6 +34,23 @@ Updates to the original code include: ### Building SLSQP +#### **Fortran Package Manager** + +The library can be built with the [Fortran Package Manager](https://github.com/fortran-lang/fpm) using the provided `fpm.toml` file like so: + +```bash +fpm build --release +``` + +To use SLSQP within your fpm project, add the following to your `fpm.toml` file: + +```yml +[dependencies] +slsqp = { git="https://github.com/jacobwilliams/slsqp.git" } +``` + +#### **FoBiS** + A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is also provided that can also build the library and examples. Use the `mode` flag to indicate what to build. For example: * To build all the examples using gfortran: `FoBiS.py build -f slsqp.fobis -mode tests-gnu` @@ -43,7 +60,7 @@ A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is The full set of modes are: `static-gnu`, `static-gnu-debug`, `static-intel`, `static-intel-debug`, `shared-gnu`, `shared-gnu-debug`, `shared-intel`, `shared-intel-debug`, `tests-gnu`, `tests-gnu-debug`, `tests-intel`, `tests-intel-debug` - To generate the documentation using [ford](https://github.com/cmacmackin/ford), run: ```FoBis.py rule --execute makedoc -f slsqp.fobis``` + To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```FoBis.py rule --execute makedoc -f slsqp.fobis``` To run the test programs, run: ```FoBis.py rule --execute tests -f slsqp.fobis``` @@ -53,7 +70,7 @@ A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is ### Documentation - The latest API documentation can be found [here](http://jacobwilliams.github.io/slsqp/). This was generated from the source code using [FORD](https://github.com/cmacmackin/ford) (note that the included `build.sh` script will also generate these files). + The latest API documentation can be found [here](http://jacobwilliams.github.io/slsqp/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford) (note that the included `build.sh` script will also generate these files). ### References diff --git a/fpm.toml b/fpm.toml index d854138..1dedb83 100644 --- a/fpm.toml +++ b/fpm.toml @@ -4,11 +4,13 @@ license = "BSD-3-Clause" author = "Jacob Williams" maintainer = "https://github.com/jacobwilliams" copyright = "Copyright (c) 2016-2021, Jacob Williams" -license = "BSD-3" description = "Modern Fortran Edition of the SLSQP Optimizer" homepage = "https://github.com/jacobwilliams/slsqp" keywords = ["optimization"] +[library] +source-dir = "src" + [[test]] name = "test_1" source-dir = "src/tests" @@ -28,3 +30,11 @@ main = "slsqp_test_71.f90" name = "test_stopping_criterion" source-dir = "src/tests" main = "slsqp_test_stopping_criterion.f90" + +[install] +library = true + +[build] +auto-executables = false +auto-examples = false +auto-tests = false \ No newline at end of file