Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed make install #48

Merged
merged 1 commit into from Oct 19, 2020
Merged

Fixed make install #48

merged 1 commit into from Oct 19, 2020

Conversation

LiamBindle
Copy link
Contributor

@LiamBindle LiamBindle commented Oct 16, 2020

This change fixes make install. The "install" locations are controlled by the RUNDIR CMake variable. The behaviour is

  • "install" (i.e. copy) location(s) for geos is controlled by -DRUNDIR= with CMake
  • If RUNDIR is not empty (empty means "" which is its default value), then geos will be "installed" to each directory in RUNDIR
  • RUNDIR can be empty ("" which is its default value), a single directory (relative or absolute), or multiple directories (relative or absolute, directories are semicolon separated as is standard for CMake)

Note that CMAKE_PREFIX_PATH is completely ignored now. This isn't ideal, but it cant be a list and so it doesn't work well for specifying run directories to install geos to (since someone might want to install geos to multiple run directories from a single build).

…s possible; note that CMAKE_PREFIX_PATH is now ignored
@lizziel
Copy link
Contributor

lizziel commented Oct 16, 2020

Could you give a few usage examples? I can pull this in shortly, as soon as it finished the quick build.

@LiamBindle
Copy link
Contributor Author

LiamBindle commented Oct 17, 2020

For sure! For example

When RUNDIR is empty

By default RUNDIR is initialized to empty (""). This is equivalent to

cmake . -DRUNDIR=""

With this make install does nothing. Instead, users would use cp to copy bin/geos to their run directory.

When RUNDIR has 1 path

If instead the user wants make install to copy /path/to/rundir1 they would do

cmake . -DRUNDIR="/path/to/rundir1"

With this make install copies bin/geos to /path/to/rundir1.

When RUNDIR has multiple paths

Say a user wants to build GCHP and use the same executable in /path/to/rundir1, /path/to/rundir2, and /path/to/rundir3. Then they would do

cmake . -DRUNDIR="/path/to/rundir1;/path/to/rundir2;/path/to/rundir3"

Then, doing make install would copy bin/geos to all three run directories.


Note that it's perfectly okay to update RUNDIR after building. Subsequent make install will copy geos to the updated run directories.

Today I was working on the quickstart guide, and this is mostly just a polishing so that we don't have to say e.g. "after compiling, copy the geos executable in build/bin to your run directories". Note that an initial draft of the quickstart guide is live: https://gchp.readthedocs.io/en/latest/ (or should be within ~20 minutes).

@lizziel lizziel merged commit db9551e into dev/gchp_13.0.0 Oct 19, 2020
@LiamBindle LiamBindle deleted the feature/fixed-install branch December 5, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants