feat: allow user to define custom CMSIS version via CMake cache variable#352
feat: allow user to define custom CMSIS version via CMake cache variable#352ashen1queter wants to merge 2 commits intoObKo:masterfrom
Conversation
Added support for setting a custom CMSIS version by defining the CMSIS_CUSTOM_VERSION cache variable. This allows users to override the default CMSIS version during CMake configuration by passing: -DCMSIS_CUSTOM_VERSION=<version> If not specified, the script defaults to version v5.6.0
…ectness via CMake cache variable Added support for setting a custom CMSIS version by defining the CMSIS_CUSTOM_VERSION cache variable. This allows users to override the default CMSIS version during CMake configuration by passing: -DCMSIS_CUSTOM_VERSION=<version> Additionally, validation has been added to check if the custom CMSIS version is valid, ensuring that only supported versions are used and a list of valid versions are displayed too. If not specified, the script defaults to version v5.6.0
|
Hi @ashen1queter, It would be nice to add a UT before merging this. Are you willing to do it ? |
| if(DEFINED CMSIS_CUSTOM_VERSION AND NOT "${CMSIS_CUSTOM_VERSION}" STREQUAL "") | ||
| list(FIND VALID_CMSIS_VERSIONS " ${CMSIS_CUSTOM_VERSION}" VALID_VERSION_INDEX) | ||
| if(VALID_VERSION_INDEX EQUAL -1) | ||
| message(FATAL_ERROR "Invalid CMSIS version provided ${CMSIS_CUSTOM_VERSION}. Supported versions are: ${VALID_CMSIS_VERSIONS}") |
There was a problem hiding this comment.
I like this, but it does make us follow the releases... Isn't letting the Fetch fail enough ?
What do you think @atsju ?
There was a problem hiding this comment.
Same. Have an explicit error message on how the user can find valid versions when fetch fails (with one or two examples).
But avoid having stm32-cmake to follow CMSIS releases. We have no automation for this.
There was a problem hiding this comment.
I will get back to this, I am currently involved in an internship
Added support for setting a custom CMSIS version by defining the CMSIS_CUSTOM_VERSION cache variable. This allows users to override the default CMSIS version during CMake configuration by passing:
-DCMSIS_CUSTOM_VERSION=
If not specified, the script defaults to version v5.6.0