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

[chenla] Spack exercise #7

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lingachen
Copy link

No description provided.

@lingachen
Copy link
Author

Complete an optional task:

Make the current dependencies (Boost, yaml-cpp) optional by defining suitable options in the CMakeLists.txt which are also picked up in the C++ code. Then add corresponding variants in the Spack recipe which allow to turn on/off these features.

You could still install the release version from the upstream repo with:

spack install [email protected]
spack install [email protected]
spack install [email protected]

For the task, I created a branch for edited CMakeLists.txt and main.cpp in my forked repo. Then, you could install the code from the branch with:

spack install spack-exercise@optional-dependencies

By default, boost and yaml-cpp are not installed. You could enable them by adding +boost and +yaml respectively. For example:

spack install spack-exercise@optional-dependencies+boost # enable boost
spack install spack-exercise@optional-dependencies+yaml # enable yaml
spack install spack-exercise@optional-dependencies+boost+yaml # enable boost and yaml

The command spackexample [path_to_config.yaml] can be executed successfully (but with different output) under all conditions.

@IshaanDesai
Copy link
Member

Nicely done 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants