Skip to content

Comments

Fix INSTALL_INTERFACE for Boost versioned-layout installs on Windows#183

Merged
sgerbino merged 1 commit intocppalliance:developfrom
sgerbino:pr/cmake-boost-superproject
Feb 23, 2026
Merged

Fix INSTALL_INTERFACE for Boost versioned-layout installs on Windows#183
sgerbino merged 1 commit intocppalliance:developfrom
sgerbino:pr/cmake-boost-superproject

Conversation

@sgerbino
Copy link
Collaborator

@sgerbino sgerbino commented Feb 23, 2026

boost_install's __boost_install_update_include_directory expects either a raw path or $<BUILD_INTERFACE:path> to replace with the correct $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>. When INSTALL_INTERFACE was already set, the pattern match failed and the versioned include path (include/boost-X_Y) was never applied.

Summary by CodeRabbit

  • Chores
    • Updated build configuration to properly expose library headers during installation for standalone builds while maintaining compatibility with superproject builds.

boost_install's __boost_install_update_include_directory expects
either a raw path or $<BUILD_INTERFACE:path> to replace with the
correct $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>. When
INSTALL_INTERFACE was already set, the pattern match failed and
the versioned include path (include/boost-X_Y) was never applied.
@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f363cce and 1f95e8a.

📒 Files selected for processing (1)
  • CMakeLists.txt

📝 Walkthrough

Walkthrough

The CMakeLists.txt was modified to reorganize how include directory interfaces are configured for the boost_capy target. The INSTALL_INTERFACE directive was removed from the common setup function and added separately in the standalone (non-superproject) installation branch.

Changes

Cohort / File(s) Summary
CMake Include Directory Interface
CMakeLists.txt
Refactored target_include_directories configuration by removing INSTALL_INTERFACE from boost_capy_setup_properties function and adding it as a separate public declaration in the standalone install path, ensuring proper include directory resolution for both build and install scenarios.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Support FetchContent, add_subdirectory, and standalone install #182: Directly related as both PRs modify boost_capy's target_include_directories to adjust BUILD_INTERFACE/INSTALL_INTERFACE usage and configure standalone install/export behavior.
  • why-not-tmc #128: Related through modifications to CMake properties for the boost_capy public target, though this PR focuses on include directory interfaces while the other addresses optimization settings.

Poem

🐰 Hopping through CMake with glee,
Build and install paths now set free,
Include dirs sorted, just right,
Standalone installs now in sight!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: fixing INSTALL_INTERFACE handling for Boost versioned-layout installs on Windows, which is the core issue described in the PR objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://183.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-02-23 23:00:51 UTC

@cppalliance-bot
Copy link

GCOVR code coverage report https://183.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://183.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://183.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-02-23 23:15:56 UTC

@sgerbino sgerbino merged commit 22ab532 into cppalliance:develop Feb 23, 2026
24 of 26 checks passed
@sgerbino sgerbino deleted the pr/cmake-boost-superproject branch February 23, 2026 23:36
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.

2 participants