blob: eb8d1f1f042adfaf9799c7864ba326b30981d3f3 [file] [log] [blame]
Chris Kay74665262021-03-09 18:57:01 +00001#
2# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7cmake_minimum_required(VERSION 3.20)
8
9#
Chris Kay794a13a2021-06-25 15:10:00 +010010# Ensure our own CMake modules can be loaded.
11#
12
13list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules")
14
15#
Chris Kay74665262021-03-09 18:57:01 +000016# We're done with very early setup, so we can now create the project. This will
17# do some of the automatic compiler detection, which we need for setting up
18# further configuration options.
19#
20# Note that this creates the following version variables:
21#
22# - `TFA_VERSION`
23# - `TFA_VERSION_MAJOR`
24# - `TFA_VERSION_MINOR`
25# - `TFA_VERSION_PATCH`
26# - `TFA_VERSION_TWEAK`
27#
28# Also, these directory variables:
29#
30# - `TFA_SOURCE_DIR`
31# - `TFA_BINARY_DIR`
32#
33# Don't swap `C` and `ASM`. Per the CMake documentation:
34#
35# > If enabling `ASM`, list it last so that CMake can check whether compilers
36# > for other languages like `C` work for assembly too.
37#
38
39project(TFA VERSION 2.5 LANGUAGES C ASM)