Chris Kay | 7466526 | 2021-03-09 18:57:01 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | cmake_minimum_required(VERSION 3.20) |
| 8 | |
| 9 | # |
Chris Kay | 794a13a | 2021-06-25 15:10:00 +0100 | [diff] [blame^] | 10 | # Ensure our own CMake modules can be loaded. |
| 11 | # |
| 12 | |
| 13 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules") |
| 14 | |
| 15 | # |
Chris Kay | 7466526 | 2021-03-09 18:57:01 +0000 | [diff] [blame] | 16 | # 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 | |
| 39 | project(TFA VERSION 2.5 LANGUAGES C ASM) |