Skip to content

Remove duplicate ImathConfig ALIAS in cmake config#517

Merged
cary-ilm merged 2 commits intoAcademySoftwareFoundation:mainfrom
cary-ilm:ImathConfig-alias-fix
Oct 4, 2025
Merged

Remove duplicate ImathConfig ALIAS in cmake config#517
cary-ilm merged 2 commits intoAcademySoftwareFoundation:mainfrom
cary-ilm:ImathConfig-alias-fix

Conversation

@cary-ilm
Copy link
Copy Markdown
Member

@cary-ilm cary-ilm commented Oct 4, 2025

A duplicate add_library(Imath::Config ALIAS ImathConfig) line slipped in. The other is on line 17. Older CMake versions seem to ignore this but cmake 4 seems to report it as an error in certain circumstances.

A duplicate add_library(Imath::Config ALIAS ImathConfig) line slipped
in. Only newer CMake versions seem to catch this.

Signed-off-by: Cary Phillips <cary@ilm.com>
@cary-ilm cary-ilm requested review from kdt3rd, lgritz and meshula October 4, 2025 15:04
@cary-ilm
Copy link
Copy Markdown
Member Author

cary-ilm commented Oct 4, 2025

@lgritz, @meshula, @kdt3rd can somebody give this a look? For some reason the OpenEXR macOS ci check has started to fail because of this.

Copy link
Copy Markdown
Contributor

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't totally understand the problems it causes, or if removing it will make anything behaviorally better, but there's no doubt that this line is literally redundant (see line 17) so I think it's definitely correct to remove it.

@cary-ilm
Copy link
Copy Markdown
Member Author

cary-ilm commented Oct 4, 2025

This is similar to the recent problem with OpenEXRConfig, IexConfig, and IlmThreadConfig, raised in AcademySoftwareFoundation/openexr#1817 and fixed in AcademySoftwareFoundation/openexr#2087. The error message didn't give much of a hint of what's actually wrong, unfortunately. CMake 3.30+ treats the duplicate add_library calls as a fatal error, but previous version silently accepted them.

OpenEXR CI jobs are failing now, but only when doing the FetchContent of Imath. I think the version of cmake the runner is picking up got bumped.

@cary-ilm cary-ilm merged commit 6677acb into AcademySoftwareFoundation:main Oct 4, 2025
33 checks passed
cary-ilm added a commit that referenced this pull request Oct 6, 2025
A duplicate add_library(Imath::Config ALIAS ImathConfig) line slipped
in. Only newer CMake versions seem to catch this.

Signed-off-by: Cary Phillips <cary@ilm.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.

2 participants