[BUILD] FindLog4cplus.cmake : uppercase vs lowercase confusion

Open Beginner friendly
#2,341 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake, cpp
Domain
build-system

Research direction

Start in cmake/FindLog4cplus.cmake and the log4cplus reference in openvdb/openvdb/CMakeLists.txt around line 157. Compare the imported target naming with log4cplus::log4cplus and verify that the custom module and installed or Conan CMake configurations use compatible symbols when configuring OpenVDB.

Written by the indexing model from the issue text.

Description

Environment

Operating System: Rocky Linux 9.8
Version / Commit SHA: 4d95e56ba7fb227dabea88b4a28c8ae0fca43392
CMake Version: 4.3.3
Compiler: gcc 14.2.1

Describe the problem

OpenVDB's custom CMake module for log4cplus in cmake/FindLog4cplus.cmake names the projects Log4cplus, and for instance in https://github.com/AcademySoftwareFoundation/openvdb/blob/4d95e56ba7fb227dabea88b4a28c8ae0fca43392/openvdb/openvdb/CMakeLists.txt#L157

But the exported CMake config from the log4cplus project calls itself log4cplus::log4cplus

https://github.com/log4cplus/log4cplus/blob/88bfae3f92ecb492f22e8ab48dd2ea33bda7270c/src/cmake/Config.cmake.in#L13

This causes issue when building in a CMake "config" environment which uses the CMake config installed by a build of log4cplus.

It would be useful if OpenVDB's custom FindLog4cplus.cmake module used the same symbols / casing convention as the CMake config from log4cplus, making it transparent whether CMake was using:

  • an auto generated CMake config from Conan
  • an installed CMake config from log4cplus
  • OpenVDB's custom CMake module
To Reproduce

Steps to reproduce the behavior:

The aswf-docker project will soon have a workaround for this issue, I will add a link to this issue once that is merged in.

Dominant language
C++
Stars
3.4k
Forks
777
Avg merge
3d 1h
Merged PRs (30d)
33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AcademySoftwareFoundation/openvdb

All issues in AcademySoftwareFoundation/openvdb

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.