aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRaef Coles <raef.coles@arm.com>2020-09-25 10:36:16 +0100
committerRaef Coles <raef.coles@arm.com>2020-09-25 10:36:16 +0100
commit5e8ea8413ea82e2fd5e0b26ef48190753b6f4e63 (patch)
tree9b377eb9cb9f801a2fb01f41fa23a15c666f1c4b /CMakeLists.txt
parent18b3bf07dca20864110cbd7987209d9338ff912a (diff)
downloadtrusted-firmware-m-5e8ea8413ea82e2fd5e0b26ef48190753b6f4e63.tar.gz
Build: Fix minor issues with new buildsystem
Several minor bugfixes: * Add error messages for unsupported generators / compilers * Remove unsupported warning disablement option on IAR * Fix typo in error message Change-Id: I492872d5af5e507d52e2f9f1fbb28f39359349ee Signed-off-by: Raef Coles <raef.coles@arm.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68730c0a4..87fbe0660 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,21 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type: [Debug, Release, RelWithDebInfo, MinSizeRel]" FORCE)
endif()
+if(
+ NOT ${CMAKE_C_COMPILER_ID} STREQUAL "GNU" AND
+ NOT ${CMAKE_C_COMPILER_ID} STREQUAL "ARMclang" AND
+ NOT ${CMAKE_C_COMPILER_ID} STREQUAL "IAR"
+)
+ Message(FATAL_ERROR "unsupported c compiler ${CMAKE_C_COMPILER_ID}")
+endif()
+
+if(
+ NOT ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" AND
+ NOT ${CMAKE_GENERATOR} STREQUAL "Ninja"
+)
+ Message(FATAL_ERROR "unsupported generator ${CMAKE_GENERATOR}. Hint: Try -G\"Unix Makefiles\"")
+endif()
+
############################ CONFIGURATION #####################################
# First load defaults.