cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

[bug] Lack of compatibility with apple-clang 13 packages

Open Vectrom opened this issue 3 years ago • 1 comments

Environment Details (include every applicable attribute)

  • Operating System+version: macOS
  • Compiler+version: apple-clang 13.0
  • Conan version: 1.48.1

Steps to reproduce (Include if Applicable)

  1. Create a package on computer with installed apple-clang 13.0, but do not specify the compiler version number explicitly (e.g. conan create . myPackage/1.2.3@org/stable -s build_type=Release).
  2. Created package has compiler.version set to 13 (not 13.0, only major)
  3. Try to use this package using cmake-conan. cmake-conan try to find packages with version 13.0 (https://github.com/conan-io/cmake-conan/blob/a2baeace536804f6093a81170699a7b16c7600d8/conan.cmake#L168) - it is non compatible with packages with compiler.version=13.

Vectrom avatar Jun 06 '22 14:06 Vectrom

Hi @Vectrom, This is expected as the compiler is set in cmake-conan with major and minor version. In Conan the compatibility in apple-clang works like this:

  • If you consume with compiler.version=13 -> will find compatible packages 13, 13.0, 13.1, ...
  • If you consume with compiler.version=13.1 -> will only match with packages created with 13.1 You can override the cmake-conan detected settings in the conan_cmake_install, passing the compiler.version as an argument.

czoido avatar Jun 13 '22 06:06 czoido