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

Conan v2 combability #718

Closed
markaren opened this issue Sep 27, 2022 · 1 comment · Fixed by #747
Closed

Conan v2 combability #718

markaren opened this issue Sep 27, 2022 · 1 comment · Fixed by #747
Assignees
Labels
enhancement New feature or request

Comments

@markaren
Copy link
Contributor

Recipes across the OSP organization are not conan v2 compatible and will stop working at some point. They should be updated sooner than later.

https://docs.conan.io/en/latest/migrating_to_2.0/recipes.html

@kyllingstad
Copy link
Member

kyllingstad commented Oct 18, 2023

I'll do this as a precursor to #741.

@joakimono currently has a Conan 2 recipe for FMI Library under review for conan-center; see conan-io/conan-center-index#20256. When that is in, we'll work towards packaging FMI Library 3.x too (currently in alpha). We can then start working in parallel on FMI 3.0 support in libcosim.

@kyllingstad kyllingstad added the enhancement New feature or request label Oct 18, 2023
kyllingstad added a commit that referenced this issue Nov 7, 2023
This fixes issue #718 (and incidentally fixes #702 too).

The modified `<gsl/util>` imports and various changes from `int` to
`std::size_t` are a consequence of using a newer version of MS GSL. I
changed the dependency version so we can use an upstream CMake package
configuration file which is compatible with the one generated by Conan
2's `CMakeDeps` generator. This should enable us to use the same
`find_package()` commands and target names regardless of whether the
build is running under Conan or not.

This also removes the ability to run Conan from within CMake, because
upstream hasn't released a version of the cmake-conan helper script with
full support for all Conan 2 features yet. (Notably, support for the
`CMakeToolchain` generator is missing.)
@kyllingstad kyllingstad linked a pull request Nov 21, 2023 that will close this issue
davidhjp01 added a commit that referenced this issue Feb 19, 2024
* Upgrade to Conan 2

This fixes issue #718 (and incidentally fixes #702 too).

The modified `<gsl/util>` imports and various changes from `int` to
`std::size_t` are a consequence of using a newer version of MS GSL. I
changed the dependency version so we can use an upstream CMake package
configuration file which is compatible with the one generated by Conan
2's `CMakeDeps` generator. This should enable us to use the same
`find_package()` commands and target names regardless of whether the
build is running under Conan or not.

This also removes the ability to run Conan from within CMake, because
upstream hasn't released a version of the cmake-conan helper script with
full support for all Conan 2 features yet. (Notably, support for the
`CMakeToolchain` generator is missing.)

* Update GH Actions workflows for Conan 2

* Use a conanio Docker image that has Conan 2

* Run pure-CMake CI build in Docker, drop Windows

* Fix minor mistake in workflow file

* Fix more small mistakes in CI

* More legible build matrix elements in non-Conan CI

* Ensure that libdl is listed as a dependency of fmilib::shared

* Also import proxyfmu executable to the build directory

* Update version numbers in README

* Clean up GitHub Actions workflows a bit

* Set the cpp_info property `cmake_target_name` as `libcosim::cosim` in the `package_info` method.

This is because otherwise CMakeDeps incorrectly generates the dependency in the target cmake file as `libcosim::libcosim`. (i.e. <consumer>-Target-release.cmake, see https://docs.conan.io/2/reference/tools/cmake/cmakedeps.html#generated-files). This would not be found via `find_package(libcosim REQUIRED)`.

* Uploading artifacts to jfrog (#751)

gcc9 builds are not available from conancenter. Built libraries are uploaded to osp jfrog.

* Updated proxyfmu

* Updated version.txt to 0.10.3

---------

Co-authored-by: David Heejong Park <[email protected]>
Co-authored-by: David Heejong Park <[email protected]>
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 a pull request may close this issue.

2 participants