aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRaef Coles <raef.coles@arm.com>2020-11-03 11:30:26 +0000
committerRaef Coles <raef.coles@arm.com>2020-11-03 11:32:02 +0000
commit956bd5cdd073fbbcd92d833cb804a40165b64ede (patch)
tree7b6a4449017a07b5d9ad73a0bd2f45c8d71c55bc /CMakeLists.txt
parent69219209c06a8a9cf707744b57e2b3e5eb98a29b (diff)
downloadtrusted-firmware-m-956bd5cdd073fbbcd92d833cb804a40165b64ede.tar.gz
Build: Add warning about absolute toolchain paths
Note that CMAKE_TOOLCHAIN_FILE no longer accepts relative paths. Implemented as an error as a relative path will also cause an error. Change-Id: Ifccaef5b7738c4867031e2d1d5cd37fbf24f7cf6 Signed-off-by: Raef Coles <raef.coles@arm.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75986f7b0..681ac89ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,6 +44,10 @@ if (CMAKE_TOOLCHAIN_FILE)
unset(CMAKE_TOOLCHAIN_FILE)
endif()
+if (NOT IS_ABSOLUTE ${TFM_TOOLCHAIN_FILE})
+ message(FATAL_ERROR "SETTING CMAKE_TOOLCHAIN_FILE no longer accepts relative paths. Please supply an absolute path or instead use TFM_TOOLCHAIN_FILE (which does accept relative paths)")
+endif()
+
include(${TFM_TOOLCHAIN_FILE})
set(CMAKE_PROJECT_INCLUDE_BEFORE ${CMAKE_SOURCE_DIR}/cmake/disable_compiler_detection.cmake)