AcademySoftwareFoundation / AcademySoftwareFoundation/Imath

Unnecessary ImathConfig-<build_type>.cmake file installed

Open
#188 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
488
Forks
161
Avg merge
1d 3h
Merged PRs (30d)
3

Description

When building with python support, `-DPYTHON=ON`, the build installs an addtional cmake file, named after the lowercase CMAKE_BUILD_TYPE variable, i.e. `ImathConfig-release.cmake` for the Release build type. This file is identical with the targets file for the same build type, i.e. `ImathTargets-release.cmake`. When built without support for python, only the usual `ImathConfig{,Version}.cmake` files are correctly installed.

I'm not sure, but could this be related to
https://github.com/AcademySoftwareFoundation/Imath/blob/master/src/python/config/CMakeLists.txt#L48? If you compare this to the config/CMakeLists.txt file, the latter does reference the Targets file in the export statement, so I assume this part is unnecessary in the src/python/config/CMakeLists.txt file, as long as we don't export an extra Targets file for the Python related parts.

I noticed this on a v3.0.5 tarball, but verified it happens as well with current HEAD.

Contributor guide

Open the contributing guide

Research direction

Start with src/python/config/CMakeLists.txt at the export statement around line 48, then compare it with config/CMakeLists.txt. Build with -DPYTHON=ON and inspect the installed CMake package files for the Release build type. Done means the redundant ImathConfig-.cmake file is no longer installed while the expected configuration and targets files remain.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.