llnl / llnl/PnMPI

CMake failure with latest CMake version

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

Nobody has claimed this yet.

Dominant language
C
Stars
22
Forks
12
PR merge metrics
No merged PRs in 30d

Description

With CMake 3.20.3, I see the following error (while still 3.16 succeeds):
```
CMake Error: install(EXPORT "pnmpi-libs" ...) includes target "pnmpi" which requires target "pnmpi_debug" that is not in any export set.
```
and the same error for `pnmpi_modules`, `pnmpi_service`, and `pnmpi_wrapper`.
I think, the reason for packaging these intermediate targets was to avoid redundant compilation of the object files. My suggestion would be to change the targets from OBJECT to STATIC, install the static libraries with EXPORT and `set(CMAKE_POSITION_INDEPENDENT_CODE ON)`.

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the install/export failure with CMake 3.20.3, then inspect the CMake configuration for the pnmpi, pnmpi_debug, pnmpi_modules, pnmpi_service, and pnmpi_wrapper targets. The work is done when installation and export generation succeeds for these targets without the reported errors, while CMake 3.16 behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.