@@ -11,6 +11,8 @@ endif()
11
11
# TARGET that match either an optionally specified list of source files or all the target's "SOURCES" found
12
12
# within in the target's "SOURCE_DIR".
13
13
#
14
+ # This utility function is only available in builds using CMake 3.27 and later.
15
+ #
14
16
# Examples:
15
17
# pico_sections_time_critical(MyTarget)
16
18
#
@@ -22,6 +24,8 @@ endif()
22
24
# \param\ TARGET The build target
23
25
# \param\ SOURCES Optional, source files of the object files to be modified. If not specified, uses the build
24
26
# target's "SOURCES" list.
27
+ #
28
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
25
29
function (pico_sections_time_critical TARGET )
26
30
add_custom_command (
27
31
TARGET ${TARGET}
@@ -33,6 +37,7 @@ function(pico_sections_time_critical TARGET)
33
37
COMMAND_EXPAND_LISTS
34
38
)
35
39
endfunction ()
40
+ endif ()
36
41
37
42
# pico_sections_not_in_flash(TARGET [SOURCES])
38
43
# \brief\ Prefix target's object file sections with ".time_critical_ram"
@@ -41,6 +46,8 @@ endfunction()
41
46
# TARGET that match either an optionally specified list of source files or all the target's "SOURCES" found
42
47
# within in the target's "SOURCE_DIR".
43
48
#
49
+ # This utility function is only available in builds using CMake 3.27 and later.
50
+ #
44
51
# Examples:
45
52
# pico_sections_not_in_flash(MyTarget)
46
53
#
@@ -52,6 +59,7 @@ endfunction()
52
59
# \param\ TARGET The build target
53
60
# \param\ SOURCES Optional, source files of the object files to be modified. If not specified, uses the build
54
61
# target's "SOURCES" list.
62
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
55
63
function (pico_sections_not_in_flash TARGET )
56
64
add_custom_command (
57
65
TARGET ${TARGET}
@@ -63,3 +71,4 @@ function(pico_sections_not_in_flash TARGET)
63
71
COMMAND_EXPAND_LISTS
64
72
)
65
73
endfunction ()
74
+ endif ()
0 commit comments