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>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68730c0..87fbe06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,21 @@
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.