--- Utilities/CMakeLists.txt.orig 2014-03-02 14:47:12.537298056 +0000 +++ Utilities/CMakeLists.txt 2014-03-02 14:47:40.212811724 +0000 @@ -51,7 +51,7 @@ # Generate documentation for "ctest" executable. get_target_property(CMD ${target} LOCATION) # only generate the documentation if the target is actually built - if(CMD) + if(CMD AND NOT CMAKE_CROSSCOMPILING) add_custom_command( OUTPUT ${CMake_BINARY_DIR}/Docs/${target}.txt ${${target}-PATH} # Possibly set PATH, see below. @@ -93,6 +93,7 @@ # add the documentation for cmake itself get_target_property(CMD cmake LOCATION) +if(NOT CMAKE_CROSSCOMPILING) add_custom_command( OUTPUT ${CMake_BINARY_DIR}/Docs/cmake.txt COMMAND ${CMD} @@ -130,10 +131,13 @@ ${DOCBOOK_FILES} DESTINATION ${CMAKE_DOC_DIR} ) +endif() install(FILES cmake.m4 DESTINATION share/aclocal) # Drive documentation generation. +if(NOT CMAKE_CROSSCOMPILING) add_custom_target(documentation ALL DEPENDS ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt ) +endif() # Documentation testing. if(BUILD_TESTING)