Skip to content

Commit

Permalink
Readme - On Spack (#16)
Browse files Browse the repository at this point in the history
* Add CMake configuration file for installation

* This aids in dependency resolution for other projects, like hohqmesh

* Change from snake case format

* CMake error messages from HOHQMesh suggest it's looking for
ftobjectlibrary-config.cmake

* Change to "set" to set build variables

* set_and_check is unknown to CMake when installing HOHQMesh via spack

* Update FFLAGS and change to camel case for config

* FFLAGS default is now set to match the default in the Makefile make
system (Per @sloede suggestion)

* Change CMake config file naming format to camel case (canonical style
of CMAKE, and requested by @sloede).

* Add CI workflow for CMake build test

* Set FC to compiler from build matrix

Co-authored-by: Michael Schlottke-Lakemper <[email protected]>

* Add CMake build/ directory to .gitignore

* Move fortran compiler environment spec to env attribute

We believe this can resolve issues with how environment variables are passed to Windows environments when cmake is called.

Co-authored-by: Michael Schlottke-Lakemper <[email protected]>

* Add Fortran compiler as cache variable

* Testing to see if this patches the issue with Windows systems builds

* Apply patch similar for CMake build tests

* This commit matches @sloede's commit at 23738bc

* Add instructions for installing via spack

* Instructions are also included to show how to add a new release to the
Spack package manager

* Apply suggestions from code review

Co-authored-by: Michael Schlottke-Lakemper <[email protected]>

---------

Co-authored-by: Joseph Schoonover <[email protected]>
Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
Co-authored-by: Andrew Winters <[email protected]>
  • Loading branch information
4 people authored Nov 8, 2024
1 parent 6fd2a37 commit 9a72b7f
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ Examples can be found in the Examples directory and in the Testing directory. Th

The library (.a) can be built with either CMake or default make.

### Spack
You can install FTObjectLibrary using the [Spack package manager](https://spack.io).
To install the FTObjectLibrary with Spack,
```
git clone https://github.com/spack/spack.git ~/spack
source ~/spack/share/spack/setup-env.sh
spack install ftobjectlibrary@main
```
Once installed, FTObjectLibrary can be added to your environment using
```
spack load ftobjectlibrary
```


### CMake
To install the FTObjectLibrary with CMake,
```
Expand All @@ -77,6 +91,51 @@ make

That will create the necessary files in that directory, which can be moved to somewhere else as desired.

### Updating Spack Packages
When new releases of FTObjectLibrary are made, you can contribute the new release to the spack packages.
Before making an update to the Spack package, you should familiarize yourself with [the Spack packaging guide](https://spack.readthedocs.io/en/latest/packaging_guide.html)


To add a new FTObjectLibrary release to Spack,
1. Fork the Spack repository on GitHub.

2. Install and initialize spack on your local system from your fork
```
git clone https://github.com/YOUR GITHUB ACCOUNT/spack.git ~/spack
source ~/spack/share/spack/setup-env.sh
```

3. Open the FTObjectLibrary package for editing
```
spack edit ftobjectlibrary
```

4. Add a new `version` metadata item to the ftobjectlibrary package. The first argument is the version name as it will appear in the spack package manager. Use the `tag` argument to specify the name of the tag as it appears in the FTObjectLibrary repository. As an example, a new version line for `v1.0.1` is shown below.
```
version('v1.0.1', tag='v1.0.1')
```

5. (Optional) If you would like to be noted as a maintainer, add your github handle to the maintainers list. Maintainers will be notified if Spack users experience issues installing FTObjectLibrary and when modifications are being made to the FTObjectLibrary package in Spack.
```
maintainers = ['schoonovernumerics','your-github-handle']
```

6. When you are finished editing, save the package file. You can verify the new version is registered in your local repository by obtaining a `spec` for FTObjectLibrary at the new version you've added.
```
spack spec [email protected]
```

7. Test to make sure the installation works
```
spack install [email protected]
```

8. Run the `spack style` command to ensure that you are meeting Spack's style requirements.

9. When ready, commit your changes and push them to your Github repository.

10. Open a Pull Request against `github.com/spack/spack` to merge your changes with the `spack/spack/develop` branch.

## Authors
FTObjectLibrary was initiated by
[David A. Kopriva](https://www.math.fsu.edu/~kopriva/), who is also the principal developer.
Expand Down

0 comments on commit 9a72b7f

Please sign in to comment.