conan
conan copied to clipboard
[question] CONAN_DISABLE_CHECK_COMPILER can be set via env var?
What is your question?
We are using Conan 1.63.
We are getting an error "Detected a mismatch for the compiler version between your conan profile settings and CMake" and one fix (until we move to Conan 2) seems to be to enable the cmake flag: CONAN_DISABLE_CHECK_COMPILER.
Can this check also be disabled via some environment variable or it needs to be done via CMake variable definition?
PS. We can fix this problem also by correcting the used build profile but I am curious if we can resolve this error also via the mentioned variable.
Thank you
Have you read the CONTRIBUTING guide?
- [X] I've read the CONTRIBUTING guide
Hi @MTomBosch
The CONAN_DISABLE_CHECK_COMPILER is a standard CMake variable, it won't listen to it from the environment, it would be necessary to define it just before the include(.../conanbuildinfo.cmake).
In any case, this functionality has been removed from the new integrations CMakeToolchain, as it is toolchain-based, it is not possible to do compiler checks in it. So probably the way moving forward is making sure that the Conan profile is aligned with the configuration before using it, as Conan will trust it as CMake cannot validate it anymore via toolchains.