This website requires JavaScript.
Explore
Help
Sign In
OrgZephyr
/
zephyr
mirror of
https://github.com/zephyrproject-rtos/zephyr.git
Watch
1
Star
0
Fork
You've already forked zephyr
0
Code
Issues
Releases
Wiki
Activity
fefb0a00e4
zephyr
/
drivers
/
sensor
/
tmp112
/
CMakeLists.txt
6 lines
90 B
CMake
Raw
Normal View
History
Unescape
Escape
license: cleanup: add SPDX Apache-2.0 license identifier Update the files which contain no license information with the 'Apache-2.0' SPDX license identifier. Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of Zephyr, which is Apache version 2. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-06 21:08:09 +08:00
# SPDX-License-Identifier: Apache-2.0
drivers: Cmake: Add __ZEPHYR_SUPERVISOR__ macro for driver files. Normally a syscall would check the current privilege level and then decide to go to _impl_<syscall> directly or go through a _handler_<syscall>. __ZEPHYR_SUPERVISOR__ is a compiler optimization flag which will make all the system calls from the driver files directly link to the _impl_<syscall>. Thereby reducing the overhead of checking the privileges. In the previous implementation all the source files would be compiled by zephyr_source() rule. This means that zephyr_* is a catchall CMake library for source files that can be built purely with the include paths, defines, and other compiler flags that all zephyr source files uses. This states that adding one extra compiler flag for only one complete directory would fail. This limitation can be overcome by using zephyr_libray* APIs. This creates a library for the required directories and it also supports directory level properties. Hence we use zephyr_library* to create a new library with macro _ZEPHYR_SUPERVISOR_ for the optimization. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-03-28 18:06:12 +08:00
zephyr_library
(
)
drivers: sensor: clean up zephyr_library calls 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>
2021-06-30 06:12:34 +08:00
zephyr_library_sources
(
tmp112.c
)