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

Use namespaced absl::abseil_dll imported target instead of abseil_dll to correctly propagate CMake usage requirements defined in abseil build on Windows #162

Merged
merged 5 commits into from
Jun 5, 2023

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Jun 4, 2023

Backport of protocolbuffers/protobuf#12978 to fix build failure on Windows such as conda-forge/libignition-msgs1-feedstock#86 (comment) .

xref: conda-forge/conda-forge-pinning-feedstock#4075

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@traversaro traversaro changed the title Use namespaces absl::abseil_dll imported target to correctly propagate CMake usage requirements defined in abseil build on Windows Use namespaced absl::abseil_dll imported target instead of abseil_dll to correctly propagate CMake usage requirements defined in abseil build on Windows Jun 4, 2023
@traversaro
Copy link
Contributor Author

@conda-forge-admin, please rerender

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2023

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/libprotobuf-feedstock/actions/runs/5168822075.

@h-vetinari
Copy link
Member

Could you adapt the CMake test to load that target if(MSVC) (or equivalent), so that we get some test coverage here?

@traversaro
Copy link
Contributor Author

Could you adapt the CMake test to load that target if(MSVC) (or equivalent), so that we get some test coverage here?

Sure! I did not fully understand why it is necessary to link a different target on Windows w.r.t. to Unix system, but it should be trivial to add a test.

@traversaro
Copy link
Contributor Author

Now that I think of, the if logic is handled internally by protobuf, so probably we just need to link protobuf::libprotopuf and everything will work.

@traversaro
Copy link
Contributor Author

The test is passing fine:

2023-06-04T14:09:03.9269965Z [1/2] Building CXX object CMakeFiles\struct_example.dir\struct_example.cc.obj
2023-06-04T14:09:03.9271237Z [2/2] Linking CXX executable struct_example.exe

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this (also upstream)!

@h-vetinari h-vetinari added the automerge Merge the PR when CI passes label Jun 4, 2023
@github-actions github-actions bot merged commit ac8134a into conda-forge:main Jun 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

  • linter: passed
  • azure: passed

Thus the PR was passing and merged! Have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the PR when CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants