[CMake] How to determine a ABI version of the arm-linux-gcc?

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jan 27 16:01:02 EST 2010


On Wednesday 27 January 2010, Yegor Yefremov wrote:
> Brad King wrote:
> > Yegor Yefremov wrote:
> >> O.K. Here are some lines of my CMakeLists.txt:
> >>
> >> set (CMAKE_C_COMPILER arm-linux-gcc)
> >> set (CMAKE_STRIP arm-linux-strip)

Oh, if you do that in CMakeLists.txt this is quite late. You should use a 
toolchain file as described in the wiki.

> >> message (STATUS "ABI ${CMAKE_C_COMPILER_ABI}")
> >>
> >> After running cmake I see only ABI as output and CMakeCache.txt doesn't
> >> contain CMAKE_C_COMPILER_ABI variable at all.
> >
> > It's in CMakeFiles/CMake*Compiler.cmake.  It works only after the
> > language is enabled by the project() or enable_language() command.
> > The compiler must be set before one of these commands runs.
>
> O.K. after I defined project language and placed set (CMAKE_C_COMPILER
> arm-linux-gcc) before project(foo C) I could get the proper compiler ABI.
> Looking forward for this feature to be included.

Please test the new attached patch again and let me know if there are issues.

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ARM_ABI.patch
Type: text/x-diff
Size: 1310 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100127/e9ffafe9/attachment.patch>


More information about the CMake mailing list