llnl / llnl/blt

CMake Install Logic Checklist

Open
#655 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
296
Forks
66
Avg merge
1h 3m
Merged PRs (30d)
1

Description

These will eventually make it into BLT docs as recommendations, but to start our list:

  • Provide detailed installed cmake config file that reflects the features that your project was configured with:

https://github.com/LLNL/conduit/blob/develop/src/config/ConduitConfig.cmake.in

  • On import, use import relative paths when looking for features and setting up combined targets:

https://github.com/LLNL/conduit/blob/d495f3f820508070210d22e88a910f28dca212cd/src/config/conduit_setup_deps.cmake#L17
https://github.com/LLNL/conduit/blob/d495f3f820508070210d22e88a910f28dca212cd/src/config/conduit_setup_targets.cmake#L67

  • On import, resolve any dependencies that have not been found. But default, use paths that reflect the TPLs that your install was configured against. Allow TPL dirs to be overridden in downstream projects via vars like ZZZ_DIR. Even if you support a different case (zzz_DIR or Zzz_DIR OR zZz_dIr ), also support ZZZ_DIR for consistency across packages.

https://github.com/LLNL/conduit/blob/d495f3f820508070210d22e88a910f28dca212cd/src/config/conduit_setup_deps.cmake#L86

  • When exporting targets, use a -targets suffix in the exported target name, such as:

https://github.com/LLNL/axom/blob/c36a089e8fd0672c43e95ca9e22bb93708132032/src/axom/CMakeLists.txt#L42

if you use your project's base name, you can encounter problems:

https://github.com/LLNL/conduit/blob/d495f3f820508070210d22e88a910f28dca212cd/src/config/ConduitConfig.cmake.in#L6

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.

Research direction

Start by reviewing the linked Conduit and Axom CMake configuration examples and compare them with the BLT documentation. Add the listed installation and exported-target recommendations to the BLT docs; done means the checklist is captured clearly for users.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.