This repository was archived by the owner on Apr 17, 2023. It is now read-only.
File tree 3 files changed +18
-7
lines changed
3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 8
8
function (resolve_sketch_headers _target_name _sketch_file _return_var)
9
9
10
10
get_target_include_directories(${_target_name} target_include_dirs)
11
- get_source_headers("${_sketch_file} " ${target_include_dirs} sketch_headers RECURSIVE)
11
+
12
+ get_source_headers("${_sketch_file} " "${target_include_dirs} " sketch_headers RECURSIVE)
13
+ get_source_headers("${ARDUINO_CMAKE_PLATFORM_HEADER_PATH} " "${target_include_dirs} " platform_headers RECURSIVE)
14
+
15
+ list (APPEND sketch_headers ${platform_headers} )
16
+ list (REMOVE_DUPLICATES sketch_headers)
17
+
18
+ set (${_return_var} ${sketch_headers} PARENT_SCOPE)
12
19
13
20
endfunction ()
Original file line number Diff line number Diff line change @@ -8,13 +8,17 @@ function(_get_function_arguments_types _signature _return_var)
8
8
9
9
string (REGEX MATCH ${ARDUINO_CMAKE_FUNCTION_ARGS_REGEX_PATTERN} function_args_string "${_signature} " )
10
10
string (REGEX MATCHALL ${ARDUINO_CMAKE_FUNCTION_SINGLE_ARG_REGEX_PATTERN}
11
- function_arg_list "${_function_args_string} " )
12
-
11
+ function_arg_list "${function_args_string} " )
13
12
# Iterate through all arguments to extract only their type
14
13
foreach (arg ${function_arg_list} )
14
+
15
15
string (REGEX MATCH ${ARDUINO_CMAKE_FUNCTION_ARG_TYPE_REGEX_PATTERN} arg_type "${arg} " )
16
16
string (STRIP "${arg_type} " arg_type) # Strip remaining whitespaces
17
- list (APPEND function_args ${arg_type} )
17
+
18
+ if (NOT "${arg_type} " STREQUAL "void" ) # Do NOT append 'void' arguments - they're meaningless
19
+ list (APPEND function_args ${arg_type} )
20
+ endif ()
21
+
18
22
endforeach ()
19
23
20
24
set (${_return_var} ${function_args} PARENT_SCOPE)
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ function(get_header_file _header_we _dir_list _return_var)
15
15
find_header_files("${include_dir} " include_dir_headers RECURSE)
16
16
17
17
foreach (included_header ${include_dir_headers} )
18
- get_name_without_file_extension(${included_header} included_header_we)
18
+ get_name_without_file_extension(" ${included_header} " included_header_we)
19
19
if ("${included_header_we} " STREQUAL "${_header_we} " )
20
- set (_return_var ${included_header} PARENT_SCOPE)
20
+ set (${ _return_var} ${included_header} PARENT_SCOPE)
21
21
return ()
22
22
endif ()
23
23
endforeach ()
24
24
25
25
endforeach ()
26
26
27
- set (_return_var NOTFOUND PARENT_SCOPE)
27
+ set (${ _return_var} " NOTFOUND" PARENT_SCOPE)
28
28
29
29
endfunction ()
You can’t perform that action at this time.
0 commit comments