diff options
author | James Le Cuirot <chewi@aura-online.co.uk> | 2014-04-27 00:02:19 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@aura-online.co.uk> | 2014-04-27 00:02:19 +0100 |
commit | cdc38712e4d359348346758e47e1ebc7d1743f82 (patch) | |
tree | 369cb23b079daf840b5df010b7b5e5ca99a3a958 /sql | |
parent | fbfa0043279757b2860e846c82cbf55ab92af9b8 (diff) | |
download | mariadb-git-cdc38712e4d359348346758e47e1ebc7d1743f82.tar.gz |
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
Diffstat (limited to 'sql')
-rw-r--r-- | sql/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
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 |