summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorJustin Jagieniak <justin@jagieniak.net>2021-04-14 10:17:16 +0200
committerDaniel Black <daniel@mariadb.org>2021-04-15 10:07:50 +1000
commit1715fef107b2b0fab2b1e2dbac062b3ac7a9c6b2 (patch)
tree8ba25346b5a2da7330db85769fa2dc3aa844bfbf /configure.cmake
parentd1f2001ee6a184cf34005a1aa81c2179308cf537 (diff)
downloadmariadb-git-1715fef107b2b0fab2b1e2dbac062b3ac7a9c6b2.tar.gz
Fix cross-compile to consider CMAKE_CROSSCOMPILING_EMULATORbb-10.5-danielblack-pr1805-cross-compile
When CMAKE_CROSSCOMPILING_EMULATOR is defined, a cross-compile can be made, however with native (emulated) execution possible. This commit takes those points in the build system that execute built targets natively and allow these to be executed in a crosscompile if CMAKE_CROSSCOMPILING_EMULATOR is defined. Closes #1805
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.cmake b/configure.cmake
index 8cff10a24ac..0bcf81d8c64 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -670,10 +670,10 @@ int main()
" HAVE_PTHREAD_YIELD_ZERO_ARG)
IF(NOT STACK_DIRECTION)
- IF(CMAKE_CROSSCOMPILING)
- MESSAGE(FATAL_ERROR
- "STACK_DIRECTION is not defined. Please specify -DSTACK_DIRECTION=1 "
- "or -DSTACK_DIRECTION=-1 when calling cmake.")
+ IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
+ MESSAGE(FATAL_ERROR
+ "STACK_DIRECTION is not defined. Please specify -DSTACK_DIRECTION=1 "
+ "or -DSTACK_DIRECTION=-1 when calling cmake.")
ELSE()
TRY_RUN(STACKDIR_RUN_RESULT STACKDIR_COMPILE_RESULT
${CMAKE_BINARY_DIR}