Add CMAKE option to control building/installing static libraries

Open
#6,799 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by locating the CMake files that call add_library() with SHARED or STATIC and the corresponding installation rules. Review the BUILD_SHARED_LIBS and proposed XRT_INSTALL_STATIC_LIBS approaches, then verify that the selected option controls whether static libraries are installed without changing the intended shared-library behavior.

Written by the indexing model from the issue text.

Description

Currently, XRT has several libraries that it builds both shared and static and it seems in general to always explicitly specify either SHARED or STATIC when calling add_library() in cmake files.

For building XRT as a conda package, the community generally avoids providing static libraries for the reasons outlined in https://github.com/conda-forge/cfep/blob/main/cfep-18.md.

Please add a cmake option that can be used to disable installing static libraries. If XRT only cares to deliver STATIC or SHARED, you could switch to using the standard BUILD_SHARED_LIBS cmake flag. But, if you want to keep delivering both, you will need to create your own XRT_INSTALL_STATIC_LIBS option.

Dominant language
C++
Stars
686
Forks
549
Avg merge
2d 4h
Merged PRs (30d)
70

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.

More from Xilinx/XRT

All issues in Xilinx/XRT

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.