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)