summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2021-03-02 00:26:29 -0800
committerGitHub <noreply@github.com>2021-03-02 08:26:29 +0000
commit0d5ab1705324e91d9788185cd16e1d4e6bf54fbe (patch)
tree3480e9df08b5a6d250a1e19d96fc7142702eb018 /cmake
parent968ba63bab1709096f09efcdf84651c8c1481110 (diff)
Add aarch64 (ARM64) cross-compile support. (#6033)
This commit adds support for cross-compiling for aarch64 platforms and simplifies cross-compilation handling for Windows. The configure script now automatically downloads and cross-compiles the required dependencies ANTLR3 and GMP when passing option --arm64 or --win64. Fixes #1479 #5769.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Toolchain-aarch64.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/Toolchain-aarch64.cmake b/cmake/Toolchain-aarch64.cmake
new file mode 100644
index 000000000..1db18e745
--- /dev/null
+++ b/cmake/Toolchain-aarch64.cmake
@@ -0,0 +1,31 @@
+#####################
+## Toolchain-aarch64.cmake
+## Top contributors (to current version):
+## Mathias Preiner
+## This file is part of the CVC4 project.
+## Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
+## in the top-level source directory and their institutional affiliations.
+## All rights reserved. See the file COPYING in the top-level source
+## directory for licensing information.
+##
+# Toolchain file for building for ARM on Ubuntu host.
+#
+# Use: cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-aarch64.cmake
+
+SET(CMAKE_SYSTEM_NAME Linux)
+SET(CMAKE_SYSTEM_PROCESSOR arm)
+
+set(TOOLCHAIN_PREFIX aarch64-linux-gnu)
+
+SET(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+
+# Set target environment path
+SET(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
+
+# Adjust the default behaviour of the find_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback