Detects AppleClang as Clang
See original GitHub issueSeems like this has been discussed before: https://github.com/conan-io/cmake-conan/issues/52 , https://github.com/conan-io/cmake-conan/issues/33
Even though they have been marked as resolved, it’s still happening to me right now on version 0.14. Let me know if you need other information and I will happily provide to resolve this issue! 😃
$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- 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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Downloading conan.cmake from https://github.com/conan-io/cmake-conan
-- Conan: Automatic detection of conan settings from cmake
In file included from <stdin>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:477:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:641:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:61:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
#include_next <string.h>
^~~~~~~~~~
1 error generated.
-- Conan: Settings= -s;build_type=Release;-s;compiler=clang;-s;compiler.version=10;-s;compiler.libcxx=libc++
-- Conan executing: conan install /Users/mathias/Demo/conanfile.txt -s build_type=Release -s compiler=clang -s compiler.version=10 -s compiler.libcxx=libc++ -g=cmake --build=missing
ERROR: Invalid setting '10' is not a valid 'settings.compiler.version' value.
Possible values are ['3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4.0', '5.0', '6.0', '7.0', '8']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"
CMake Error at Build/conan.cmake:399 (message):
Conan install failed='1'
Call Stack (most recent call first):
Build/conan.cmake:485 (conan_cmake_install)
CMakeLists.txt:16 (conan_cmake_run)
Issue Analytics
- State:
- Created 4 years ago
- Comments:29 (10 by maintainers)
Top Results From Across the Web
In CMake, how can I test if the compiler is Clang?
Detecting LLVM Clang and Apple Clang is crucial to ensuring the code compiles and executes as expected. I'm so tired of dealing with...
Read more >Getting Started: Building and Running Clang
From Xcode 4.2, Clang is the default compiler for Mac OS X. ... In general, Clang will detect the best version of libstdc++...
Read more >CMake 3.14 not detecting AppleCLang in MacOS Mojave + ...
I'm expecting CMAKE_C_COMPILER_ID / CMAKE_CXX_COMPILER_ID variables in CMake filled with "AppleClang" instead of "Clang" only, to make sure ...
Read more >Clang Compiler User's Manual - Apple Open Source
-f[no-]color-diagnostics: This option, which defaults to on when a color-capable terminal is detected, controls whether or not Clang prints diagnostics in ...
Read more >cmake-compile-features(7)
... from the compiler, and use preprocessor conditions to detect the features actually available. ... AppleClang : Apple Clang for Xcode versions 4.4+....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This error should be fixed by: https://github.com/conan-io/cmake-conan/pull/226 to be merged in v0.16
Status update.
Setting
CMP0025
at the main CMakeLists.txtAnd exporting
SDKROOT
Fixes the issue at GitHub Action. But note: