mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-16 20:32:26 +00:00
In drivers/sensor/CMakeLists.txt, we have various lines like this: add_subdirectory_ifdef(CONFIG_FOO foo) Then drivers/sensor/foo/CMakeLists.txt says: zephyr_library() zephyr_library_sources_ifdef(CONFIG_FOO foo.c) This is redundant; the foo/CMakeLists.txt won't be added to the build system unless CONFIG_FOO=y in the first place, so there's no need for extra boilerplate testing it again. Remove all these unnecessary instances in each sensor driver's CMakeLists.txt using this pattern: zephyr_library() zephyr_library_sources(foo.c) In a couple of places, the '.c' extension is missing. Add them in for consistency when that happens. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
13 lines
338 B
CMake
13 lines
338 B
CMake
# ST Microelectronics IIS2DH 3-axis accelerometer driver
|
|
#
|
|
# Copyright (c) 2020 STMicroelectronics
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
zephyr_library()
|
|
|
|
zephyr_library_sources(iis2dh.c)
|
|
zephyr_library_sources(iis2dh_i2c.c)
|
|
zephyr_library_sources(iis2dh_spi.c)
|
|
zephyr_library_sources_ifdef(CONFIG_IIS2DH_TRIGGER iis2dh_trigger.c)
|