Jelajahi Sumber

Merge branch 'bugfix/cmake_src_exclude_issue_v4.0' into 'release/v4.0'

cmake: fix issue with handling of EXCLUDE_SRCS (v4.0)

See merge request espressif/esp-idf!5900
Mahavir Jain 6 tahun lalu
induk
melakukan
465d46e9dd
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      tools/cmake/component.cmake

+ 2 - 2
tools/cmake/component.cmake

@@ -271,7 +271,7 @@ macro(__component_add_sources sources)
         if(__EXCLUDE_SRCS)
         if(__EXCLUDE_SRCS)
             foreach(src ${__EXCLUDE_SRCS})
             foreach(src ${__EXCLUDE_SRCS})
                 get_filename_component(src "${src}" ABSOLUTE)
                 get_filename_component(src "${src}" ABSOLUTE)
-                list(REMOVE_ITEM source "${src}")
+                list(REMOVE_ITEM sources "${src}")
             endforeach()
             endforeach()
         endif()
         endif()
     endif()
     endif()
@@ -538,4 +538,4 @@ endfunction()
 # Wrapper around target_compile_definitions that passes the component name
 # Wrapper around target_compile_definitions that passes the component name
 function(component_compile_definitions)
 function(component_compile_definitions)
     target_compile_definitions(${COMPONENT_LIB} PRIVATE ${ARGV})
     target_compile_definitions(${COMPONENT_LIB} PRIVATE ${ARGV})
-endfunction()
+endfunction()