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

Remove Findfmt.cmake #4069

Merged
merged 8 commits into from
Jan 5, 2024

Conversation

domin144
Copy link
Contributor

@domin144 domin144 commented Dec 3, 2023

Description

fmt provides cmake config files since at least version 7.0.0, which is the minimum version supported.
Fixed some variable names, so the provided config can be used.
The previous variable names were missing, if the library was installed in a custom location,
like in case of manual build or provided by conan.

Tests

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

Copy link

linux-foundation-easycla bot commented Dec 3, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@domin144
Copy link
Contributor Author

domin144 commented Dec 3, 2023

Conan still does not like this solution:

CMake Error at src/include/CMakeLists.txt:77 (file):
  file COPY cannot find
  "/home/domin144/.conan2/p/b/openi2b837708c2554/b/src/src/include/$<$<CONFIG:Release>:/home/domin144/.conan2/p/b/fmt8d14cec70a06c/p/include>/fmt/core.h":
  No such file or directory.

@domin144
Copy link
Contributor Author

domin144 commented Dec 3, 2023

conan can be made happy with INTERNALIZE_FMT=OFF. Still, there may be other contexts, where INTERFACE_INCLUDE_DIRECTORIES contains generator expressions and INTERNALIZE_FMT is on.
I am open to comments on how can this be solved.

@domin144 domin144 force-pushed the remove_find_fmt branch 3 times, most recently from 54014dc to 4eeb968 Compare December 6, 2023 16:42
@domin144
Copy link
Contributor Author

domin144 commented Dec 6, 2023

Not really proud of the changes, but it should work now.

@lgritz
Copy link
Collaborator

lgritz commented Dec 9, 2023

Sorry for the delay, I've been travelling (still am, but had a little time today to catch up here).

Conceptually, it's fine with me to get rid of Findfmt.cmake since our minimum fmt no longer requires it, and then cleaning up what remains.

Looks like the changes as they stand are failing most of the CI tests, though.

CMake Error at src/cmake/externalpackages.cmake:354 (add_library):
  add_library called with IMPORTED argument but no library type.

I'll merge once that gets cleaned up.

@domin144 domin144 force-pushed the remove_find_fmt branch 3 times, most recently from 0a16db2 to 238d32d Compare December 9, 2023 14:39
@domin144
Copy link
Contributor Author

Another attempt. If this does not work, I will have to get back to this next week.

fmt provides a cmake config files since at least version 7.0.0,
which is the minimum version supported.
Fixed some variable names, so the provided config can be used.

Signed-off-by: Dominik Wójt <[email protected]>
Signed-off-by: Dominik Wójt <[email protected]>
Signed-off-by: Dominik Wójt <[email protected]>
Signed-off-by: Dominik Wójt <[email protected]>
Signed-off-by: Dominik Wójt <[email protected]>
@domin144 domin144 marked this pull request as ready for review January 5, 2024 16:30
@domin144
Copy link
Contributor Author

domin144 commented Jan 5, 2024

It took some tries, but it finally passes.

Copy link
Collaborator

@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.

LGTM, thanks for the fixes

@lgritz lgritz merged commit 6d2a4ff into AcademySoftwareFoundation:master Jan 5, 2024
25 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Jan 17, 2024
fmt provides cmake config files since at least version 7.0.0, which is
the minimum version supported.
Fixed some variable names, so the provided config can be used.
The previous variable names were missing, if the library was installed
in a custom location,
like in case of manual build or provided by conan.

---------

Signed-off-by: Dominik Wójt <[email protected]>
@domin144 domin144 deleted the remove_find_fmt branch February 20, 2024 18:27
1div0 pushed a commit to 1div0/OpenImageIO that referenced this pull request Feb 24, 2024
fmt provides cmake config files since at least version 7.0.0, which is
the minimum version supported.
Fixed some variable names, so the provided config can be used.
The previous variable names were missing, if the library was installed
in a custom location,
like in case of manual build or provided by conan.

---------

Signed-off-by: Dominik Wójt <[email protected]>
Signed-off-by: Peter Kovář <[email protected]>
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