From cdc38712e4d359348346758e47e1ebc7d1743f82 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 27 Apr 2014 00:02:19 +0100 Subject: MySQL Bug #61340: Use CMake EXPORT feature to aid cross-compiling. This technique is documented at: http://www.cmake.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build Basic steps are: # mkdir native cross # cd native # cmake /path/to/maria # make IMPORT_EXECUTABLES # cd ../cross # cmake -DCMAKE_TOOLCHAIN_FILE=foo -DIMPORT_EXECUTABLES=/path/to/native/import_executables.cmake /path/to/maria # make --- sql/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/CMakeLists.txt') diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index ad4b12813d3..7d2b329f300 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -218,7 +218,9 @@ RUN_BISON( ) # Gen_lex_hash -ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) +IF(NOT CMAKE_CROSSCOMPILING) + ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) +ENDIF() ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h -- cgit v1.2.1