ORNL / ORNL/GridKit

Automate the checking for optional external dependency targets

Open
#220 1 comment 1 reaction 1 assignee View on GitHub

@alexander-novo is already working on this.

Since Aug 25, 2025.

development enhancement
Dominant language
C++
Stars
27
Forks
11
Avg merge
3d 8h
Merged PRs (30d)
23

Description

Summary

Add a method to automatically check (e.g., CMake macro) if a target we're trying to link within GridKit exists. The goal would be to minimize the number of places we have to explicitly check that targets exist.

Rationale

@alexander-novo comment on #218:
This addresses not being able to build without specifically SUNDIALS::linsolklu but all of SUNDIALS is considered an optional dependency right? If my build of SUNDIALS doesn't have idas or nvecserial then the build will still fail because this if statement only checks for sunlinsolklu. We can surround this library and all executables with an if statements checking if(TARGET idas AND TARGET nvecserial) sure, but what happens when the dependencies we need for solvers_dyn change? We'll have to hunt down every executable that's built by default and update all of their if statements. I guess that's fine, but it kind of seems to me like it would be nice to automate that process. As well one of the problems originally was that the if statement was checking the wrong target - it could easily happen again where dependencies are changed and an if statement is missed and builds start failing again.

Description

See #215 for example.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.