conan-io / cmake-conan

CMake wrapper for conan C and C++ package manager
MIT License
823 stars 250 forks source link

Add support for Android compiler.libcxx #213

Open pkubik opened 4 years ago

pkubik commented 4 years ago

Right now the main scripts sets only one of the desktop specific values for the compiler.libcxx (in conan_cmake_detect_unix_libcxx macro), e.g. libstdc++, libstdc++11. Please add support for other types values, e.g.c++_staticandc++_shared`. Since it would be difficult to fully handle all special cases like Android I'd suggest another parameter for the override. At the moment it's possible to specify custom settings, but they are appended to the settings generated by the script and thus ignored, e.g.:

Conan executing: /home/pkubik/.local/bin/conan install . -s build_type=Debug -s compiler=clang -s compiler.version=9 -s compiler.libcxx=libstdc++11 -s compiler.libcxx=c++_shared

Note that compiler.libcxx is given twice, and the second one (specified manually) is being ignored rendering me unable to choose the correct value for Android project.

czoido commented 4 years ago

Hi @pkubik, I have reproduced the issue, you are right that those settings will not be taken into account. Thanks a lot for reporting this, we'll have a look at it.

czoido commented 4 years ago

Hi @pkubik, This issue is related to https://github.com/conan-io/cmake-conan/issues/255 and will be fixed by https://github.com/conan-io/cmake-conan/pull/258 that will be merged to 0.16 version. Now compiler.libcxx will be set correctly.