This repository was archived by the owner on Apr 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 88function (resolve_sketch_headers _target_name _sketch_file _return_var)
99
1010 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)
1219
1320endfunction ()
Original file line number Diff line number Diff line change @@ -8,13 +8,17 @@ function(_get_function_arguments_types _signature _return_var)
88
99 string (REGEX MATCH ${ARDUINO_CMAKE_FUNCTION_ARGS_REGEX_PATTERN} function_args_string "${_signature} " )
1010 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} " )
1312 # Iterate through all arguments to extract only their type
1413 foreach (arg ${function_arg_list} )
14+
1515 string (REGEX MATCH ${ARDUINO_CMAKE_FUNCTION_ARG_TYPE_REGEX_PATTERN} arg_type "${arg} " )
1616 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+
1822 endforeach ()
1923
2024 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)
1515 find_header_files("${include_dir} " include_dir_headers RECURSE)
1616
1717 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)
1919 if ("${included_header_we} " STREQUAL "${_header_we} " )
20- set (_return_var ${included_header} PARENT_SCOPE)
20+ set (${ _return_var} ${included_header} PARENT_SCOPE)
2121 return ()
2222 endif ()
2323 endforeach ()
2424
2525 endforeach ()
2626
27- set (_return_var NOTFOUND PARENT_SCOPE)
27+ set (${ _return_var} " NOTFOUND" PARENT_SCOPE)
2828
2929endfunction ()
You can’t perform that action at this time.
0 commit comments