Skip to content

Declare the public CMake target's C++17 requirement - #97

Open
fhgffy wants to merge 1 commit into
Tessil:masterfrom
fhgffy:fix/cmake-cxx17-requirement
Open

fhgffy wants to merge 1 commit into
Tessil:masterfrom
fhgffy:fix/cmake-cxx17-requirement

Conversation

@fhgffy

@fhgffy fhgffy commented Oct 5, 2026

Copy link
Copy Markdown

Summary

Add cxx_std_17 to robin_map's INTERFACE compile features so CMake propagates the library's language requirement to consumers, including installed and build-tree exports.

The headers require C++17 facilities such as std::launder and std::clamp, but the exported target currently advertises no language requirement. A C++17-capable compiler is therefore invoked as C++14 when the consuming project sets that as its baseline. The existing test executable explicitly requests C++17 and hides the missing requirement.

Add a separate consumer target with a C++14 baseline to exercise this during the normal test build. Related: #88 reported the C++17 compilation symptom; this change publishes the existing requirement through the CMake target.

Validation

Locally with GCC 14.2, CMake 3.31.6 and Boost 1.83:

  • New regression fails on the unchanged library and builds/runs with the fix
  • Installed, build-tree and add_subdirectory consumers pass, including transitive linking; unrelated C++14 targets and higher C++20 settings are preserved
  • Upstream suite: 133/133 cases in Release and 133/133 with exceptions disabled
  • git diff --check passes

Other compilers/platforms and minimum-CMake execution were not run locally.

This branch has not been deployed

No deployments
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.

1 participant