Skip to content

Conversation

@feltech
Copy link
Member

@feltech feltech commented Oct 13, 2023

Description

Closes #1020. Conan v2 has been out for some time now and supports all of our dependencies.

The command-line syntax is somewhat different, so update all usages to use the new syntax.

It is no longer possible to mutate a Conan profile via the command line, so we have to supply a custom profile (or edit the default profile via an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility functions injected out of the box, in particular the detect_api. This means we can ship a single Conan profile, which will work across all platforms. Currently, auto-detection is used for all profile fields except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of these explicitly specified fields follow VFX Reference Platform CY2022.

Use the CMakeToolchain generator, rather than the (now removed) cmake_paths. Hence update the various CMAKE_TOOLCHAIN_FILE et al. references to use conan_toolchain.cmake

  • have updated the release notes.
  • I have updated all relevant user documentation.
  • I have updated downstream projects that use Conan to build OpenAssetIO

Test Instructions

Assuming a Debug build of OpenAssetIO, the new command line becomes

conan install -of .conan -s "&:build_type=Debug" -pr resources/build/vfx22.profile resources/build

where & is a special token that means "host application". The effect of "&:build_type=Debug is to create CMake config files for debug builds. Without this, a debug build will fail since the imported target won't have any properties (e.g. include directories).

The -pr is optional - you can use the auto-detected profile, but it's less likely to be CY22 compliant.

@feltech feltech force-pushed the work/1020-conan2 branch 10 times, most recently from 7e5031f to c69895e Compare October 16, 2023 09:03
Closes OpenAssetIO#1020. Conan v2 has been out for some time now and supports all
of our dependencies.

The command-line syntax is somewhat different, so update all usages to
use the new syntax.

It is no longer possible to mutate a Conan profile via the command line,
so we have to supply a custom profile (or edit the default profile via
an alternative mechanism - not pursued here).

Thankfully, Conan profiles are Jinja templates with some handy utility
functions injected out of the box, in particular the `detect_api`. This
means we can ship a single Conan profile, which will work across all
platforms. Currently, auto-detection is used for all profile fields
except the C++ standard, and on Linux the libstdc++ ABI toggle. Both of
these explicitly specified fields follow VFX Reference Platform CY2022.

Use the `CMakeToolchain` generator, rather than the (now removed)
`cmake_paths`. Hence update the various `CMAKE_TOOLCHAIN_FILE` et al.
references to use `conan_toolchain.cmake`

Signed-off-by: David Feltell <[email protected]>
@feltech feltech mentioned this pull request Jun 19, 2024
2 tasks
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.

Conan 2 in CI

1 participant