Skip to content

fix(cmake): only set CXX_SCAN_FOR_MODULES on CMake >= 3.28 (#345) - #367

Open
rachelwelchio wants to merge 1 commit into
hanickadot:mainfrom
rachelwelchio:fix/cmake-cxx-scan-modules-345
Open

fix(cmake): only set CXX_SCAN_FOR_MODULES on CMake >= 3.28 (#345)#367
rachelwelchio wants to merge 1 commit into
hanickadot:mainfrom
rachelwelchio:fix/cmake-cxx-scan-modules-345

Conversation

@rachelwelchio

Copy link
Copy Markdown

Summary

Guards CXX_SCAN_FOR_MODULES behind CMake >= 3.28 so configuring the INTERFACE ctre target works on older CMake (#345).

CXX_SCAN_FOR_MODULES was added in CMake 3.28. Setting it unconditionally also breaks CMake < 3.19 on INTERFACE libraries (non-whitelisted property). Behavior on CMake >= 3.28 is unchanged.

Test plan

  • Configure with CMake < 3.28 (e.g. 3.15 / 3.16) without CTRE_MODULE — should succeed
  • Configure with CMake >= 3.28 — CXX_SCAN_FOR_MODULES still set to 0 on the INTERFACE target
  • Module build path (CTRE_MODULE=ON) unchanged

Closes #345

…t#345)

Signed-off-by: rachelwelchio <rachelwelchio@users.noreply.github.com>
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.

3.10.0 breaks CMake builds for CMake < 3.28

1 participant