summaryrefslogtreecommitdiff
path: root/sql/CMakeLists.txt
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@aura-online.co.uk>2014-04-27 00:02:19 +0100
committerJames Le Cuirot <chewi@aura-online.co.uk>2014-04-27 00:02:19 +0100
commitcdc38712e4d359348346758e47e1ebc7d1743f82 (patch)
tree369cb23b079daf840b5df010b7b5e5ca99a3a958 /sql/CMakeLists.txt
parentfbfa0043279757b2860e846c82cbf55ab92af9b8 (diff)
downloadmariadb-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/CMakeLists.txt')
-rw-r--r--sql/CMakeLists.txt4
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