[cmake-developers] Cannot cross-compile CMake

Rolf Eike Beer eike at sf-mail.de
Mon Sep 12 09:55:02 EDT 2011


> Looks to me like this would be sufficient:
>
> # only build/install the documentation if not crosscompiling
> IF(NOT CMAKE_CROSSCOMPILING)
>   INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES})
>   INSTALL_FILES(${CMAKE_DOC_DIR} FILES ${HTML_FILES} ${TEXT_FILES})
>   INSTALL(FILES cmake.m4 DESTINATION share/aclocal)
>
>   # Drive documentation generation.
>   ADD_CUSTOM_TARGET(documentation ALL DEPENDS ${DOC_FILES}
> ${CMake_BINARY_DIR}/Docs/cmake.txt )
> ENDIF()
>
> Not sure if there's a "wiser" way to achieve your goal...

That would still leave the issue open that I need to manually specify

>>        -D KWSYS_LFS_WORKS=TRUE \
>>        -D KWSYS_CHAR_IS_SIGNED=TRUE \

because CMake can't find out the correct values itself.

> How are you testing the cross-compiled CMake to ensure that it works
> as expected...?

Currently I don't, I only wanted to see if I can reproduce a binutils
issue I see on PA-RISC
(http://sourceware.org/bugzilla/show_bug.cgi?id=13168) on ARM which could
also be affected. The next thing will be that I copy the result on my
Beagleboard and test what happens.

Eike



More information about the cmake-developers mailing list