Skip to content

Commit

Permalink
Update cmake/stm32/common.cmake
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Staub <atsju2@yahoo.fr>
  • Loading branch information
robamu and atsju authored Jul 15, 2021
1 parent fefcc41 commit 2081093
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cmake/stm32/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ foreach(FAMILY ${STM32_SUPPORTED_FAMILIES_LONG_NAME})
endforeach()
list(REMOVE_DUPLICATES STM32_SUPPORTED_FAMILIES_SHORT_NAME)

if(DEFINED ENV{STM32_TOOLCHAIN_PATH})
message(STATUS "Detected toolchain path STM32_TOOLCHAIN_PATH in environmental variables: ")
message(STATUS "$ENV{STM32_TOOLCHAIN_PATH}")
set(STM32_TOOLCHAIN_PATH $ENV{STM32_TOOLCHAIN_PATH})
endif()

if(NOT STM32_TOOLCHAIN_PATH)
if(DEFINED ENV{STM32_TOOLCHAIN_PATH})
message(STATUS "Detected toolchain path STM32_TOOLCHAIN_PATH in environmental variables: ")
message(STATUS "$ENV{STM32_TOOLCHAIN_PATH}")
set(STM32_TOOLCHAIN_PATH $ENV{STM32_TOOLCHAIN_PATH})
endif()
if(NOT CMAKE_C_COMPILER)
set(STM32_TOOLCHAIN_PATH "/usr")
message(STATUS "No STM32_TOOLCHAIN_PATH specified, using default: " ${STM32_TOOLCHAIN_PATH})
Expand Down Expand Up @@ -319,4 +318,3 @@ include(stm32/l0)
include(stm32/l1)
include(stm32/l4)
include(stm32/l5)

0 comments on commit 2081093

Please sign in to comment.