Multiple compilers, ConanMultiPackager and CMake troubles
See original GitHub issueHi!
I wish to package multiple packages for Linux x64, compiler with GCC/Clang.
To do so, I have two terminals. One has env vars CONAN_GCC_VERSIONS
& cie, the other has the Clang variables.
The problem is that the chosen compiler (clang) is not detected by CMake when running test_package
.
Here is the output I get:
– The C compiler identification is GNU 7.2.0 – The CXX compiler identification is GNU 7.2.0 – Check for working C compiler: /usr/bin/cc – Check for working C compiler: /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: /usr/bin/c++ – Check for working CXX compiler: /usr/bin/c++ – works – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Detecting CXX compile features – Detecting CXX compile features - done – Conan: called by CMake conan helper CMake Error at build/9fad4defe7e3af96f74f9172f136f8e10e7bf90a/conanbuildinfo.cmake:381 (message): Incorrect ‘clang’, is not the one detected by CMake: ‘GNU’
When creating a single package with conan create theo/stable -pr clang50
, everything works fine:
– The C compiler identification is Clang 5.0.0 – The CXX compiler identification is Clang 5.0.0 – Check for working C compiler: /usr/bin/clang – Check for working C compiler: /usr/bin/clang – 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: /usr/bin/clang++ – Check for working CXX compiler: /usr/bin/clang++ – works
Issue Analytics
- State:
- Created 6 years ago
- Comments:25 (17 by maintainers)
Top GitHub Comments
https://github.com/conan-io/conan-package-tools#specifying-a-different-base-profile
Upgrade and try!
The @uilianries fix to iterate the builds and alter the env sounds good to me, not very hacky. I’m going to try the approach of passing a profile and will report again.