From 2d77367e5160a2e7ca2f2b94c307bc971f063c74 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project_generator/templates/cmakelistgccarm.tmpl b/project_generator/templates/cmakelistgccarm.tmpl index 74075713..5873897f 100644 --- a/project_generator/templates/cmakelistgccarm.tmpl +++ b/project_generator/templates/cmakelistgccarm.tmpl @@ -25,6 +25,9 @@ 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-NOTFOUND OR ARM_NONE_EABI_GPP-NOTFOUND OR ARM_NONE_EABI_OBJCOPY-NOTFOUND) + MESSAGE(FATAL_ERRORO "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)