CMAKE_ASM_COMPILER_TARGET not set on Android after enable_language(ASM) with Clang
Compiling some ASM files, I get the following command line generated:
/home/travis/build/Orphis/boost-cmake/android-ndk-r12b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --sysroot=/home/travis/build/Orphis/boost-cmake/android-ndk-r12b/platforms/android-24/arch-arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_EXPORT -DBOOST_CONTEXT_SOURCE=1 -isystem ../boost/boost_1_63_0 -g -fPIC -w -MD -MT CMakeFiles/Boost_context.dir/libs/context/jump_combined.S.o -MF CMakeFiles/Boost_context.dir/libs/context/jump_combined.S.o.d -o CMakeFiles/Boost_context.dir/libs/context/jump_combined.S.o -c /home/travis/build/Orphis/boost-cmake/libs/context/jump_combined.S
This will build the file for the HOST architecture as it is missing a flag like "--target=armv7-none-linux-androideabi" flag (for compiling for ARMv7 for example). When I manually set it (for example to CMAKE_CXX_COMPILER_TARGET), I get the file properly compiled for the intended architecture.
I'll try to investigate a fix, but I'm sure you can come up with a fix pretty quickly :)