Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ if(CONFIG_MISRA_SANE)
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${CPP_MISRA_SANE_FLAG}>)
endif()

# @Intent: Set compiler specific flags for standard C includes
toolchain_cc_nostdinc()

# @Intent: Set compiler specific macro inclusion of AUTOCONF_H
toolchain_cc_imacros(${AUTOCONF_H})

Expand Down Expand Up @@ -1497,3 +1494,8 @@ if(CONFIG_BOARD_DEPRECATED)
removed in version ${CONFIG_BOARD_DEPRECATED}"
)
endif()

# @Intent: Set compiler specific flags for standard C includes
# Done at the very end, so any other system includes which may
# be added by Zephyr components were first in list.
toolchain_cc_nostdinc()
2 changes: 1 addition & 1 deletion lib/libc/minimal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_include_directories(include)
zephyr_system_include_directories(include)

zephyr_library()
zephyr_library_sources(
Expand Down
8 changes: 4 additions & 4 deletions lib/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: Apache-2.0


add_library(PTHREAD INTERFACE)
zephyr_interface_library_named(posix_subsys)

target_include_directories(PTHREAD INTERFACE ${ZEPHYR_BASE}/include/posix)
target_include_directories(posix_subsys INTERFACE ${ZEPHYR_BASE}/include/posix)

zephyr_library()
zephyr_library_sources(pthread_common.c)
Expand All @@ -21,5 +21,5 @@ zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_key.c)
zephyr_library_sources_ifdef(CONFIG_POSIX_MQUEUE mqueue.c)
zephyr_library_sources_ifdef(CONFIG_POSIX_FS fs.c)

zephyr_library_link_libraries(PTHREAD)
target_link_libraries(PTHREAD INTERFACE zephyr_interface)
zephyr_library_link_libraries(posix_subsys)
target_link_libraries(posix_subsys INTERFACE zephyr_interface)
8 changes: 8 additions & 0 deletions lib/posix/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,12 @@ config POSIX_MAX_OPEN_FILES
endif
endif # FILE_SYSTEM

# The name of this option is mandated by zephyr_interface_library_named
# cmake directive.
config APP_LINK_WITH_POSIX_SUBSYS
bool "Make POSIX headers available to application"
default y
help
Add POSIX subsystem header files to the 'app' include path.

endif # POSIX_API
1 change: 0 additions & 1 deletion tests/posix/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(posix_common)

target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/posix)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code should not be commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, and also removed this directive from the other posix test.

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
2 changes: 0 additions & 2 deletions tests/posix/fs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(fs)

target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})