From 45a14fa188e7880cc26fd5d35255758ad917a959 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 16 Jun 2016 17:53:06 -0500 Subject: [PATCH] Add check for existance of correct compiler to cmake --- project_generator/templates/cmakelistgccarm.tmpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/project_generator/templates/cmakelistgccarm.tmpl b/project_generator/templates/cmakelistgccarm.tmpl index 74075713..ed63d47a 100644 --- a/project_generator/templates/cmakelistgccarm.tmpl +++ b/project_generator/templates/cmakelistgccarm.tmpl @@ -25,6 +25,11 @@ set(CMAKE_SYSTEM_PROCESSOR {{core}}) find_program(ARM_NONE_EABI_GCC arm-none-eabi-gcc) find_program(ARM_NONE_EABI_GPP arm-none-eabi-g++) find_program(ARM_NONE_EABI_OBJCOPY arm-none-eabi-objcopy) +if ((ARM_NONE_EABI_GCC MATCHES ".*-NOTFOUND") OR + (ARM_NONE_EABI_GPP MATCHES ".*-NOTFOUND") OR + (ARM_NONE_EABI_OBJCOPY MATCHES ".*-NOTFOUND")) + MESSAGE(FATAL_ERROR "Could not find the arm-none-eabi gnu toolchain") +endif() cmake_force_c_compiler("${ARM_NONE_EABI_GCC}" GNU) cmake_force_cxx_compiler("${ARM_NONE_EABI_GPP}" GNU)