[CMake] Using clang + assembly language (cross compilation)

Emmanuel Blot eblot.ml at gmail.com
Wed Dec 17 04:21:24 EST 2014


Ooops, sorry for the noise, there was an issue with the CMakeLists.txt file.
Please ignore my last post.

On Wed, Dec 17, 2014 at 10:15 AM, Emmanuel Blot <eblot.ml at gmail.com> wrote:
> Hi,
>
> Is there a special order to make CMake recognize .S files - with Clang
> toolchain - as valid source files?
>
> -- ASM: /usr/local/bin/clang
> -- The ASM compiler identification is Clang
> -- Found assembler: /usr/local/bin/clang
> -- Configuring done
> CMake Error at lib/CMakeLists.txt:9 (ADD_LIBRARY):
>   Cannot find source file:
>
>    .../lib/arch/arm/gen/divide.S
>
>   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
>   .hxx .in .txx
>
> with
>
> INCLUDE (Platform/Generic)
> ...
> FIND_PROGRAM (xcc clang)
>
> SET (CMAKE_ASM_COMPILER_ID Clang)
>
> INCLUDE (CMakeForceCompiler)
> CMAKE_FORCE_C_COMPILER (${xcc} Clang)
> CMAKE_FORCE_CXX_COMPILER (${xcc} Clang)
> SET (CMAKE_ASM_COMPILER ${xcc})
>
> ...
>
> PROJECT (project C ASM)
>
> ...
>
>
> Thanks,
> Manu.


More information about the CMake mailing list