INFO :cmake_flags.py [253]: Setting Cross build flags: [2020-04-29 09:18:35,231]
-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
-- Check for working C compiler: /home/xxx/.conan/data/llvm/8.0.1/ncr/stable/package/b913856ceabcea86d734a6498b8d4fbfefc47cb2/bin/clang
-- Check for working C compiler: /home/xxx/.conan/data/llvm/8.0.1/ncr/stable/package/b913856ceabcea86d734a6498b8d4fbfefc47cb2/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/xxx/.conan/data/llvm/8.0.1/ncr/stable/package/b913856ceabcea86d734a6498b8d4fbfefc47cb2/bin/clang++
-- Check for working CXX compiler: /home/xxx/.conan/data/llvm/8.0.1/ncr/stable/package/b913856ceabcea86d734a6498b8d4fbfefc47cb2/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan setting CPP STANDARD: 11 WITH EXTENSIONS OFF
-- Conan: Adjusting fPIC flag (ON)
-- Conan: Compiler Clang>=8, checking major version 8.0.1
-- Conan: Checking correct version: 8.0
CMake Error at conanbuildinfo.cmake:960 (message):
Detected a mismatch for the compiler version between your conan profile
settings and CMake:
Compiler version specified in your conan profile: 8.0.1
Compiler version detected in CMake: 8.0
I have found this similar issue:
However, since it was fixed I assume this is something else. I have actually checked the cmake file that reports the problem and clearly there is no patch version considered. The check would always fail when X.Y.Z compiler version is used by the profile.
Hi @kobalicek
Yes, the cmake generator is not prepared for this compiler version check including down to the minor. Lets try to fix it.
In the meantime, you can avoid the checks (they are just there to ensure that your current env and cmake is matching your defined Conan settings for the dependencies), by defining the CMake variable: CONAN_DISABLE_CHECK_COMPILER
Quick question, just to be sure: Besides having
Use major.minor.patch compiler version in the profile
You also had to define a custom settings.yml that define such version including the patch, right?
Yeah, I inherited some projects and they use custom settings. At the moment we have clang 8.0.0 and 8.0.1 profiles for both debug and release, so they really differ in patch version.
I would be actually fine with major.minor to be honest and CONAN_DISABLE_CHECK_COMPILER is sufficient in my case, would be nice that variable appeared in the error message :)
CONAN_DISABLE_CHECK_COMPILER is sufficient in my case, would be nice that variable appeared in the error message :)
Yes, lets add this variable in the error message too, good idea
To summarize the fix:
Thanks't a lot, I think this is definitely sufficient!