Skip to content

Conversation

lunacd
Copy link
Contributor

@lunacd lunacd commented May 4, 2025

Fixes #115

This PR makes changes to the CMake setup of this project, that should bring the following benefits:

  1. It's easy now to package this project, should anyone be interested. The CML of this project now configures and installs all the CMake config and metadata that find_package expects. Consuming a packaged and installed version of this library is as easy as:
find_package(cpp-subprocess REQUIRED)
target_link_libraries(<target> PRIVATE cpp-subprocess::subprocess)
  1. Even without packaging, this new setup is easier to consume for CMake. The cmake needed to consume this library is updated in README. The benefit of doing that over vendoring a copy of cpp-subprocess directly into somebody's project, is to easily consume upstream updates without having do the copying all over again and potentially ending up with a confusing git log with first-party and upstream changes mangled together.
  2. CMake now reflects the version of this library.
  3. The include path of this project is now consistently #include <cpp-subprocess/subprocess.hpp>, as documented in README. It can be slightly confusing if sometimes this project is called subprocess.hpp and sometimes it's cpp-subprocess/subprocess.hpp, at least within the official repo itself.

lunacd added 5 commits April 28, 2025 20:00
CMake 4 has removed compatibility with CMake < 3.5
Bumping minimum required version to 3.5 enables
CMake 4 to build this code.
This commit configures and installs CMake metadata files. This also
provides the namespaced ALIAS target `cpp-subprocess::subprocess`.
@arun11299
Copy link
Owner

@lunacd Awesome! Thanks for your contribution.

@arun11299 arun11299 merged commit f6232a7 into arun11299:master May 4, 2025
3 checks passed
@lunacd lunacd deleted the cmake4 branch May 4, 2025 15:12
@fanquake fanquake mentioned this pull request May 19, 2025
fanquake added a commit to bitcoin/bitcoin that referenced this pull request May 21, 2025
e63a703 subprocess: Don't add an extra whitespace at end of Windows command line (laanwj)

Pull request description:

  A list of the backported PRs:
  - arun11299/cpp-subprocess#119

  The following PRs were skipped for backporting:
  - arun11299/cpp-subprocess#118 because there is no changes in the header code.

  Required for #32566.

ACKs for top commit:
  laanwj:
    Code review ACK e63a703

Tree-SHA512: 69a74aa7f9c611a9ec910e27161c5e9e147067d37f8335953cd3875fcc88dc840a2f7b206bb603f22507159e406b1449f1dc4702fffe890bb824672641b4feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake interface target
2 participants