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

Conan 2.0 doesn't accept values from `conan_cmake_autodetect()`

Open xahon opened this issue 3 years ago • 4 comments
trafficstars

ERROR: Invalid setting 'Visual Studio' is not a valid 'settings.compiler' value. Possible values are ['sun-cc', 'gcc', 'msvc', 'clang', 'apple-clang', 'intel-cc', 'qcc', 'mcst-lcc']

My current workaround is

conan_cmake_autodetect(settings)
list(FIND settings "compiler=Visual Studio" index)
if (NOT ${index} EQUAL -1)
    list(REMOVE_AT settings ${index})
    list(INSERT settings ${index} "compiler=msvc")
endif()

xahon avatar May 15 '22 09:05 xahon

I also noticed that this function doesn't parse anything correctly. Conan reports a lot of different errors like:

  • ERROR: The provided compiler.cppstd is not supported with the specified compiler
  • ERROR: Invalid setting 'MDd' is not a valid 'settings.compiler.runtime' value. Possible values are ['static', 'dynamic']

xahon avatar May 15 '22 10:05 xahon

Hi @xahon, Thanks for the question, right now cmake-conan does not support conan 2.0 (we added a note in the README announcing this), once it is GA we will see if we start supporting it.

czoido avatar May 18 '22 08:05 czoido

@xahon Excuse me. What does "GA" stand for?

hwhsu1231 avatar May 18 '22 09:05 hwhsu1231

@xahon Excuse me. What does "GA" stand for?

It stands for General Availability

czoido avatar May 18 '22 09:05 czoido