i trying crosscompilation using cmake. easy examples on internet, managed crosscompile library on linux (x86 , arm), windows , android. on custom platform.
the process need achieve:
- sourcing environment (this destroy previous bash classic environment)
- compile cmake
- execute want
but cmake testing symbols in custom c/c++ libraries make library unable compile. errors have cmake versions of glibcxx , cxxabi (no c issues) not of them.
is there way make cmake ok ?
edit:
i tried using:
set(cmake_c_compiler_works true) set(cmake_cxx_compiler_works true)
and with:
include(cmakeforcecompiler) ... cmake_force_c_compiler(${env_path}/bin/${cc}) cmake_force_cxx_compiler(${env_path}/bin/${cxx})
but cmake still checking symbols.
without having environment nor error message it's not easy tell actual root cause here 2 of common causes , respective fixes:
if don't have complete toolchain file created custom environment - cmake can't link simple test program - can try relatively new (version 3.6) global cmake variable named
cmake_try_compile_target_type
.so add following:
set(cmake_try_compile_target_type static_library)
then cmake try build static library.
to have common gcc compiler variables set , have basic checks, try:
set(cmake_system_name generic)
see cmake cross compiling: setting system , toolchain:
if target embedded system without os set cmake_system_name "generic"
references
Comments
Post a Comment