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

Upgrade to Conan 2 #109

Merged
merged 29 commits into from
Mar 4, 2024
Merged

Upgrade to Conan 2 #109

merged 29 commits into from
Mar 4, 2024

Conversation

kyllingstad
Copy link
Member

This depends on open-simulation-platform/libcosim#747. (Once that PR has been merged, the version specification of the libcosim requirement should be changed so it no longer points to the osp/testing-feature... branch.)

I had to switch from a simple conanfile.txt to a more involved conanfile.py because the "import" functionality has been removed in Conan 2. Initially this seemed like a hassle, but in the end, it turned out to be beneficial:

  • We no longer have to maintain the list of imports by hand. Instead, we dynamically iterate over the dependencies list in the generate() method.
  • It allowed me to adjust the RPATH of the imported files from within the conanfile, rather than doing it in the GitHub Actions workflow file as before. Thus, people who build locally also get libaries and executables with an appropriate RPATH.

@kyllingstad kyllingstad added the enhancement New feature or request label Nov 23, 2023
@kyllingstad kyllingstad self-assigned this Nov 23, 2023
@kyllingstad kyllingstad marked this pull request as draft February 21, 2024 14:32
@kyllingstad kyllingstad marked this pull request as ready for review February 22, 2024 07:50
@kyllingstad kyllingstad marked this pull request as draft February 22, 2024 08:09
@kyllingstad kyllingstad marked this pull request as ready for review February 22, 2024 09:33
@kyllingstad
Copy link
Member Author

I've just updated this PR a bit to enable the use of CMake presets created by Conan, which is really convenient. I've updated the README and CI workflow accordingly.

Copy link
Member

@eidekrist eidekrist left a comment

Choose a reason for hiding this comment

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

Tested resulting artifact on Windows, works beautifully!

@kyllingstad kyllingstad merged commit 71b7bf3 into master Mar 4, 2024
8 checks passed
@kyllingstad kyllingstad deleted the feature/conan-2 branch March 4, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants