cmake-conan
cmake-conan copied to clipboard
[bug] `libcxxcompiler.libcxx` is detected incorrectly for Android NDK
cmake_minimum_required(VERSION 3.16)
project(Test VERSION 1.0 LANGUAGES CXX)
set(CMAKE_ANDROID_STL_TYPE "c++_static")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading 'conan.cmake' from 'https://github.com/conan-io/cmake-conan'")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake" "${CMAKE_BINARY_DIR}/conan.cmake")
endif()
include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(REQUIRES
any_package_here
BASIC_SETUP CMAKE_TARGETS NO_OUTPUT_DIRS)
The output:
-- Check for working CXX compiler: C:/Dev/Tools/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: C:/Dev/Tools/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- 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
-- Conan: Settings= -s;build_type=Debug;-s;compiler=clang;-s;compiler.version=9;-s;compiler.libcxx=libstdc++11
-- Conan: checking conan executable
-- Conan: Found program C:/Dev/Tools/Python3/Scripts/conan.exe
-- Conan: Version found Conan version 1.28.0
Expected:
compiler.libcxx=c++_static
Also, os, and arch is not detected correctly:
...
-- Conan executing: C:/Dev/Tools/Python3/Scripts/conan.exe install . -s build_type=Release -s compiler=clang -s compiler.version=9 -s compiler.libcxx=libstdc++11 -g=cmake
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=9
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
Expected:
arch=armv8
arch_build=x86_64
os=Android
os_build=Windows