Skip to content

Difference between the ZEPHYR_BASE and PROJECT_SOURCE_DIR CMake variables is unclear #7173

@ulfalizer

Description

@ulfalizer

To me anyway.

cmake/kconfig.cmake references kconfig.py via ${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py, while you have e.g. include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) in other places.

Looking at https://github.com/zephyrproject-rtos/zephyr/blob/master/cmake/app/boilerplate.cmake#L75, they seem to be synonyms.

@SebastianBoe pointed out that PROJECT_SOURCE_DIR is a standard CMake variable, so maybe it's added as a synonym for ZEPHYR_BASE for people who are familiar with CMake. Would be nice to have it documented if that's it.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions