beanz added a comment. Since these are really simple source files, it is probably better to check CMAKE_CROSSCOMPILING and when cross-compiling use ExternalProject to configure host versions of the tools. http://reviews.llvm.org/D15004