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

Add Special NCCS Build Preset #744

Merged
merged 4 commits into from
Feb 7, 2024

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Feb 5, 2024

This is an attempt to change the build pattern using CMakePresets.json to work smarter at NCCS. If this works, let say you have a checkout of GEOSgcm in:

/discover/swdev/mathomp4/Models/GEOSgcm-FixPresets

along with the following environment variables (with examples for me):

CMAKE_PRESET_NAME=NCCS
CMAKE_BUILD_LOCATION=/discover/nobackup/projects/gmao/SIteam/mathomp4/cmake-builds
CMAKE_INSTALL_LOCATION=/discover/nobackup/projects/gmao/SIteam/mathomp4/cmake-installs

Then when you do:

cmake --preset Debug && cmake --build --preset Debug -j 10

it will put the build dir in:

/discover/nobackup/projects/gmao/SIteam/mathomp4/cmake-installs/GEOSgcm-FixPresets/build-Debug

and installs to:

/discover/nobackup/projects/gmao/SIteam/mathomp4/cmake-installs/GEOSgcm-FixPresets/install-Debug

The other style is used by setting:

export CMAKE_PRESET_NAME=Default

This triggers the "old" way where builds will be at the root of the build. So if the code is in:

/discover/swdev/mathomp4/Models/GEOSgcm-FixPresets

then you'll get:

/discover/swdev/mathomp4/Models/GEOSgcm-FixPresets/build-Debug
/discover/swdev/mathomp4/Models/GEOSgcm-FixPresets/install-Debug

Note: This takes discipline as it uses the sourceDirName for a build. That is, the name of the directory holding the code, so for /discover/swdev/mathomp4/Models/GEOSgcm-FixPresets, it uses GEOSgcm-FixPresets.

@mathomp4 mathomp4 requested a review from a team as a code owner February 5, 2024 15:34
@mathomp4 mathomp4 self-assigned this Feb 5, 2024
@mathomp4 mathomp4 added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Feb 5, 2024
@mathomp4 mathomp4 marked this pull request as draft February 5, 2024 15:34
@mathomp4 mathomp4 marked this pull request as ready for review February 5, 2024 19:21
@mathomp4 mathomp4 merged commit eac8c37 into main Feb 7, 2024
9 checks passed
@mathomp4 mathomp4 deleted the feature/mathomp4/split-cmake-build-presets branch February 7, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants