blob: 6345bf150db5dadab05eee270cd524eb0ad566e8 [file] [log] [blame]
Jonny Svärd2b8922d2022-12-15 12:40:00 +01001#
Rajasekaran Kalidossa09161d2024-04-18 20:42:15 +02002# SPDX-FileCopyrightText: Copyright 2020-2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
Jonny Svärd2b8922d2022-12-15 12:40:00 +01003# SPDX-License-Identifier: Apache-2.0
4#
5# Licensed under the Apache License, Version 2.0 (the License); you may
6# not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an AS IS BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18# Cross compilation example when using a custom compiler and toolchain files
19
20set(CMAKE_SYSTEM_NAME Generic)
21
22set(CMAKE_C_COMPILER /opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc)
23set(CMAKE_CXX_COMPILER /opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-g++)
24
25set(CMAKE_CXX_STANDARD 14)
26set(CMAKE_SYSTEM_PROCESSOR "aarch64")
27
Rajasekaran Kalidossa09161d2024-04-18 20:42:15 +020028add_compile_options(-Wall -Wextra -Werror)
Jonny Svärd2b8922d2022-12-15 12:40:00 +010029
30set(CMAKE_FIND_ROOT_PATH /opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/aarch64-linux-gnu/)
31
32set(FIND_LIBRARY_USE_LIB64_PATHS TRUE)
33
34set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
35set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
36set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
37set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
38
39