Skip to content

Commit

Permalink
drivers: Replace zephyr_library with zephyr_library_amend
Browse files Browse the repository at this point in the history
Replace zephyr_library() with zephyr_library_amend() to silent a build
warning like the following:

    CMake Warning at .../scsat1-fsw/workspace/zephyr/CMakeLists.txt:915 (message):
      No SOURCES given to Zephyr library: drivers__pwm

      Excluding target from build.

    CMake Warning at .../scsat1-fsw/workspace/zephyr/CMakeLists.txt:915 (message):
      No SOURCES given to Zephyr library: drivers__spi

      Excluding target from build.

This commit does not include drivers/misc. zephyr/driver/misc doesn't
call zephyr_library(). Thus, "No SOURCES" warning will not be
generated.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
  • Loading branch information
yashi authored and sasataku committed Aug 16, 2024
1 parent b0e6247 commit 2416ac3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/can/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023 Space Cubics, LLC.
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_amend()

zephyr_library_sources_ifdef(CONFIG_CAN_SCCAN can_sccan.c)
2 changes: 1 addition & 1 deletion drivers/i2c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023 Space Cubics, LLC.
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_amend()

zephyr_library_sources_ifdef(CONFIG_I2C_SC i2c_sc.c)
2 changes: 1 addition & 1 deletion drivers/pwm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023 Space Cubics, LLC.
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_amend()

zephyr_library_sources_ifdef(CONFIG_PWM_SC pwm_sc.c)
2 changes: 1 addition & 1 deletion drivers/spi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_amend()
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers/spi)
zephyr_library_sources_ifdef(CONFIG_SPI_SC_QSPI spi_sc.c)

0 comments on commit 2416ac3

Please sign in to comment.