Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop2] detect_compiler() detects invalid 'settings.compiler.version' for apple-clang #620

Open
yzakharchuk opened this issue Feb 8, 2024 · 0 comments
Assignees

Comments

@yzakharchuk
Copy link

detect_compiler() takes only major version of apple-clang which is invalid.

$ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.2)
$ git clone https://github.com/conan-io/cmake-conan.git -b develop2
$ cd cmake-conan/example
$ mkdir build
$ cmake -G Xcode -B build -S . -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=../conan_provider.cmake -DCMAKE_BUILD_TYPE=Release
Output log
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMake-Conan: first find_package() found. Installing dependencies with Conan
-- CMake-Conan: Checking if a default profile exists
ERROR: Profile not found: default
-- CMake-Conan: The default profile doesn't exist, detecting it.
detect_api: Found apple-clang 12.0

Detected profile:
WARN: This profile is a guess of your environment, please check it.
WARN: Defaulted to cppstd='gnu17' for apple-clang.
WARN: The output of this command is not guaranteed to be stable and can change in future Conan versions.
WARN: Use your own profile files for stability.
Saving detected profile to /______/.conan2/profiles/default
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=12.0
os=Macos

-- CMake-Conan: cmake_system_name=Darwin
-- CMake-Conan: cmake_osx_deployment_target=
-- CMake-Conan: cmake_system_processor=x86_64
-- CMake-Conan: CMake compiler=AppleClang
-- CMake-Conan: CMake compiler version=12.0.0.12000032
-- CMake-Conan: [settings] compiler=apple-clang
-- CMake-Conan: [settings] compiler.version=12
CMake Warning at /______/cmake-conan/conan_provider.cmake:296 (message):
  CMake-Conan: The C compiler is not defined.  Please define CMAKE_C_COMPILER
  or enable the C language.
Call Stack (most recent call first):
  /______/cmake-conan/conan_provider.cmake:375 (append_compiler_executables_configuration)
  /______/cmake-conan/conan_provider.cmake:522 (detect_host_profile)
  CMakeLists.txt:7 (find_package)


-- CMake-Conan: Creating profile /______/cmake-conan/example/build/conan_host_profile
-- CMake-Conan: Profile:
[settings]
arch=x86_64
os=Macos
compiler=apple-clang
compiler.version=12
compiler.cppstd=14
compiler.libcxx=libc++
[conf]
tools.cmake.cmaketoolchain:generator=Xcode

CMake Warning at /______/cmake-conan/conan_provider.cmake:535 (message):
  Cmake-conan: CMakeDeps generator was not defined in the conanfile.  Please
  define the generator as it will be mandatory in the future
Call Stack (most recent call first):
  CMakeLists.txt:7 (find_package)


-- CMake-Conan: Installing both Debug and Release
-- CMake-Conan: conan install /______/cmake-conan/example -of=/______/cmake-conan/example/build/conan --profile:host=default;--profile:host=/______/cmake-conan/example/build/conan_host_profile;--profile:build=default;-s;build_type=Release;--build=missing;-g;CMakeDeps
ERROR: Invalid setting '12' is not a valid 'settings.compiler.version' value.
Possible values are ['5.0', '5.1', '6.0', '6.1', '7.0', '7.3', '8.0', '8.1', '9.0', '9.1', '10.0', '11.0', '12.0', '13', '13.0', '13.1', '14', '14.0', '15', '15.0']
Read "http://docs.conan.io/2/knowledge/faq.html#error-invalid-setting"
CMake Error at /______/cmake-conan/conan_provider.cmake:436 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  /______/cmake-conan/conan_provider.cmake:546 (conan_install)
  CMakeLists.txt:7 (find_package)
@jcar87 jcar87 self-assigned this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants