Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 0435dc5

Browse files
Cleared cache at beginning of find_arduino_library function
1 parent c6d2d30 commit 0435dc5

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

‎cmake/Platform/Libraries/LibrariesFinder.cmake‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
macro(_cleanup_find_arduino_library)
1+
macro(_clear_find_library_state)
22

33
unset(library_path CACHE)
44

@@ -18,6 +18,10 @@ endmacro()
1818
#=============================================================================#
1919
function(find_arduino_library _target_name _library_name)
2020

21+
22+
_clear_find_library_state()
23+
24+
2125
set(argument_options "3RD_PARTY" "HEADER_ONLY" "QUIET")
2226
cmake_parse_arguments(parsed_args "${argument_options}" "" "" ${ARGN})
2327

@@ -28,7 +32,7 @@ function(find_arduino_library _target_name _library_name)
2832
endif ()
2933

3034
find_file(library_path
31-
NAMES ${_library_name}
35+
NAMES "${_library_name}"
3236
PATHS ${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} ${ARDUINO_SDK_LIBRARIES_PATH}
3337
${ARDUINO_CMAKE_SKETCHBOOK_PATH} ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}
3438
PATH_SUFFIXES libraries dependencies
@@ -43,7 +47,7 @@ function(find_arduino_library _target_name _library_name)
4347

4448
if (NOT library_headers)
4549
if (parsed_args_QUIET)
46-
_cleanup_find_arduino_library()
50+
_clear_find_library_state()
4751
return()
4852
else ()
4953
message(SEND_ERROR "Couldn't find any header files for the "
@@ -57,7 +61,7 @@ function(find_arduino_library _target_name _library_name)
5761

5862
if (NOT library_sources)
5963
if (parsed_args_QUIET)
60-
_cleanup_find_arduino_library()
64+
_clear_find_library_state()
6165
return()
6266
else ()
6367
message(SEND_ERROR "Couldn't find any source files for the "
@@ -78,6 +82,6 @@ function(find_arduino_library _target_name _library_name)
7882
endif ()
7983
endif ()
8084

81-
_cleanup_find_arduino_library()
85+
_clear_find_library_state()
8286

8387
endfunction()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /