Add anti-rollback argument.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
c1cc33fd9d
commit
d189c2978c
1 changed files with 6 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ macro(HEX2DEC VAR VAL)
|
|||
endwhile()
|
||||
endmacro(HEX2DEC)
|
||||
|
||||
macro(SET_VERSION MAJOR MINOR FILE)
|
||||
macro(SET_VERSION MAJOR MINOR FILE ROLLBACK)
|
||||
file(READ ${FILE} ver)
|
||||
string(REGEX MATCHALL "0x([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])" _ ${ver})
|
||||
string(CONCAT ver_major ${CMAKE_MATCH_1}${CMAKE_MATCH_2})
|
||||
|
|
@ -42,7 +42,11 @@ macro(SET_VERSION MAJOR MINOR FILE)
|
|||
HEX2DEC(ver_minor ${ver_minor})
|
||||
message(STATUS "Found version:\t\t ${ver_major}.${ver_minor}")
|
||||
if(PICO_PLATFORM)
|
||||
pico_set_binary_version(${CMAKE_PROJECT_NAME} MAJOR ${ver_major} MINOR ${ver_minor})
|
||||
if (PICO_RP2350)
|
||||
pico_set_binary_version(${CMAKE_PROJECT_NAME} MAJOR ${ver_major} MINOR ${ver_minor} ROLLBACK ${ROLLBACK})
|
||||
else()
|
||||
pico_set_binary_version(${CMAKE_PROJECT_NAME} MAJOR ${ver_major} MINOR ${ver_minor})
|
||||
endif()
|
||||
endif()
|
||||
SET(${MAJOR} ${ver_major})
|
||||
SET(${MINOR} ${ver_minor})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue