@@ -17,11 +17,6 @@ else()
1717 set (TOOLCHAIN_EXT "" )
1818endif (WIN32 )
1919
20- # default to Release build
21- if (NOT CMAKE_BUILD_TYPE )
22- set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release." FORCE)
23- endif ()
24-
2520find_program (COMPILER_ON_PATH "${TARGET_TRIPLET} gcc${TOOLCHAIN_EXT} " )
2621
2722if (DEFINED ENV{ARM_GCC_PATH})
@@ -32,6 +27,8 @@ elseif(COMPILER_ON_PATH)
3227 # then check on the current path
3328 get_filename_component (ARM_TOOLCHAIN_PATH ${COMPILER_ON_PATH} DIRECTORY )
3429 message (STATUS "Using ARM GCC from path = ${ARM_TOOLCHAIN_PATH} " )
30+ else ()
31+ message (FATAL_ERROR "Unable to find ARM GCC. Either add to your PATH, or define ARM_GCC_PATH to the compiler location" )
3532endif ()
3633
3734# Perform compiler test with the static library
@@ -51,7 +48,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
5148set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
5249set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
5350
54- set (CMAKE_COMMON_FLAGS "--specs=nano.specs -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -Wall -Wextra -Wuninitialized -Wshadow - Wdouble-promotion -Werror -Wno-unused-parameter" )
51+ set (CMAKE_COMMON_FLAGS "--specs=nano.specs -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -Wall -Wextra -Wuninitialized -Wdouble-promotion -Werror -Wno-unused-parameter" )
5552set (CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${CMAKE_COMMON_FLAGS} " )
5653set (CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${CMAKE_COMMON_FLAGS} " )
5754set (CMAKE_ASM_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} " )
0 commit comments