cmake: remove spurious IS_ABSOLUTE logic in zephyr_sources()
target_sources() documentation states: Relative source file paths are interpreted as being relative to the current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR). Remove spurious code duplicating cmake's behaviour. It proved to be a time-consuming red herring while debugging some path-related issue and "less is more". Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
86bfa07c5c
commit
e217c1b172
1 changed files with 2 additions and 9 deletions
|
@ -65,17 +65,10 @@
|
|||
# https://cmake.org/cmake/help/latest/command/target_sources.html
|
||||
function(zephyr_sources)
|
||||
foreach(arg ${ARGV})
|
||||
if(IS_ABSOLUTE ${arg})
|
||||
set(path ${arg})
|
||||
else()
|
||||
set(path ${CMAKE_CURRENT_SOURCE_DIR}/${arg})
|
||||
endif()
|
||||
|
||||
if(IS_DIRECTORY ${path})
|
||||
if(IS_DIRECTORY ${arg})
|
||||
message(FATAL_ERROR "zephyr_sources() was called on a directory")
|
||||
endif()
|
||||
|
||||
target_sources(zephyr PRIVATE ${path})
|
||||
target_sources(zephyr PRIVATE ${arg})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue