LoginSignup
1
0

More than 5 years have passed since last update.

conanで "Incorrect 'apple-clang' version 'compiler.version=8.1' is not the one detected by CMake: 'Clang=9.0'" って言われる

Last updated at Posted at 2017-10-17

Conan を使っていて、エラー出たんでメモ。

ビルド時に以下のエラーが発生

Incorrect 'apple-clang' version 'compiler.version=8.1' is not the one
detected by CMake: 'Clang=9.0'

Macで動かしていたのですが、コンパイラのバージョンがどうもあってないみたい。

ググったら、外国の方が解決策を書いてくれてました。

~/.conan/profiles/defaultにデフォルトのバージョンが書いてあるのでそこを修正。

[settings]                                                                                                                                  
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=9.0 // 8.1 だったのを 9.0に変更
os=Macos

これで、エラーが出なくなりました。

[追記]
・conanにgtestを導入しようとした際、なぜか compiler.version が 7.3 に変わってしまう現象が起きたのでその解決策を追記します。
環境変数 CONAN_APPLE_CLANG_VERSIONS に希望のバージョンを設定(自分の場合は 9.0)
これで解決しました

Conan
conan
compiler.version
apple-clang
cmake
gtest

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0