Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boehm GC optional dependency warnings at configure time #204

Open
kevin-- opened this issue Mar 8, 2022 · 4 comments
Open

Boehm GC optional dependency warnings at configure time #204

kevin-- opened this issue Mar 8, 2022 · 4 comments

Comments

@kevin--
Copy link

kevin-- commented Mar 8, 2022

when running CMake to generate a project, we get the following cmake warning in the console (with no Boehm GC installed)

-- Found GC library: BOEHM_GC_LIBRARIES-NOTFOUND
CMake Warning (dev) at /usr/local/Cellar/cmake/3.22.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (Boehm_GC)
  does not match the name of the calling package (BoehmGC).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  app/lib/immer/cmake/FindBoehmGC.cmake:105 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  app/lib/immer/CMakeLists.txt:73 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
@arximboldi
Copy link
Owner

Yes, the package is optional. If you know how to remove the warning, happy to accept the change.

@kevin--
Copy link
Author

kevin-- commented Mar 8, 2022

Yes, the package is optional. If you know how to remove the warning, happy to accept the change.

i can try to look into it eventually. Just curious because the other libs do not cause such warnings

@Tradias
Copy link

Tradias commented Sep 17, 2022

The following should silence the warning.

# Suppress warnings, see the grey Note on https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html
set(FPHSA_NAME_MISMATCHED on)
find_package(Boehm_GC)
unset(FPHSA_NAME_MISMATCHED)

Of course actually addressing the warning would be nicer. It seems to suggest to call find_package(BoehmGC), notice no underscore.

@arximboldi
Copy link
Owner

Oh, interesting, thanks Tradias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants