cpp-best-practices / gui_starter_template

A template CMake project to get you started with C++ and tooling
The Unlicense
2.51k stars 445 forks source link

CI fails with "Detected a mismatch for the compiler version between your conan profile" #199

Open michael-veksler opened 2 years ago

michael-veksler commented 2 years ago

Thank you for providing this starter project. Without it I would have likely not set-up something as comprehensive.

The issue: I could not make my project's CI work with visual studio, so I disabled the CI for VS. Setting CONAN_DISABLE_CHECK_COMPILER, as suggested in the error message, does not help as I could not find a way to pass it through to conan. I would be grateful for a hint to the right direction to make CI work for VS.

The error text:

CMake Error at conanbuildinfo.cmake:403 (message):
-- Configuring incomplete, errors occurred!
  Detected a mismatch for the compiler version between your conan profile
See also "D:/a/solver/solver/conan-cache/.conan/data/docopt.cpp/0.6.3/_/_/build/255fef913b09852b9ac19f13fe91677114965382/build_subfolder/CMakeFiles/CMakeOutput.log".
  settings and CMake:

  Compiler version specified in your conan profile: 17

  Compiler version detected in CMake: 19.31

  Please check your conan profile settings (conan profile show
  [default|your_profile_name])

  P.S.  You may set CONAN_DISABLE_CHECK_COMPILER CMake variable in order to
  disable this check.
Call Stack (most recent call first):
  conanbuildinfo.cmake:471 (conan_error_compiler_version)
  conanbuildinfo.cmake:592 (check_compiler_version)
  conanbuildinfo.cmake:142 (conan_check_compiler)
  CMakeLists.txt:5 (CONAN_BASIC_SETUP)