Update CMakeLists.txt
fix CMake to define ChibiOS default branch when the CHIBIOS_VERSION option isn't set at all
@@ -351,11 +351,14 @@ if(RTOS_CHIBIOS_CHECK)
message(FATAL_ERROR "error: could not find Git, make sure you have it installed.")
endif()
+ # ChibiOS version
+ set(CHIBIOS_VERSION_EMPTY TRUE)
+
# check if build was requested with a specifc ChibiOS version
if(DEFINED CHIBIOS_VERSION)
-
- if("${CHIBIOS_VERSION}" STREQUAL "")
- set(CHIBIOS_VERSION_EMPTY TRUE)
+ if("${CHIBIOS_VERSION}" NOT STREQUAL "")
+ set(CHIBIOS_VERSION_EMPTY FALSE)
+ endif()
endif()
if(CHIBIOS_VERSION_EMPTY)
@@ -378,8 +381,6 @@ if(RTOS_CHIBIOS_CHECK)
set(CHIBIOS_GIT_TAG "stable_${CHIBIOS_SHORT_VERSION}.x")
endif()
- endif()
-
# need to setup a separate CMake project to download the code from the GitHub repository
# otherwise it won't be available before the actual build step
configure_file("CMake/ChibiOS.CMakeLists.cmake.in"
