CMake: silence CMP0167 from MRViewer Boost::locale lookup#6076
Merged
Conversation
Use Boost's own CMake config (BoostConfig.cmake) for the
`find_package(Boost ... locale)` call, mirroring the pattern already
used in MRMesh and MRPch. This stops CMake 3.30+ from emitting the
CMP0167 deprecation warning ("The FindBoost module is removed") on
non-Emscripten builds. The Emscripten branch keeps module mode,
since vcpkg's Emscripten Boost port doesn't ship a CMake config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch the
find_package(Boost ... locale)call insource/MRViewer/CMakeLists.txttoCONFIGmode on non-Emscripten builds, mirroring the pattern already used inMRMesh/CMakeLists.txtandMRPch/CMakeLists.txt.This silences the
CMP0167deprecation warning ("The FindBoost module is removed") emitted by CMake 3.30+ when the legacyFindBoostmodule is invoked indirectly via vcpkg's Boost wrapper.Why
CMake 3.30 removed the bundled
FindBoostmodule in favor of Boost's ownBoostConfig.cmake. Callingfind_package(Boost ...)withoutCONFIGfalls into the legacy module path, triggering:vcpkg already ships
BoostConfig.cmake(its wrapper just forwards to it), so switching toCONFIGmode is a no-op functionally — the same Boost is found, only the legacy code path is avoided.The Emscripten branch keeps module mode because vcpkg's Emscripten Boost port doesn't install CMake config files; that branch additionally sets
CMP0167 OLDso the warning stays suppressed there too.Test plan
CMP0167warning gone from thewindows-vs2019-meshlibconfigure log (the job that originated the warning).Boost::localelinkage unchanged on WASM.