This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit includes the following fixes in order to remove environment
setting of ZEPHYR_BASE is west extension commands.
- Build command
west build --pristine will now use the ZEPHYR_BASE variable found
in CMakeCache.txt in the build folder.
This ensures that the pristine command is executed from the same
Zephyr that was used for compilation.
- Board command
The west boards command no longer sets Zephyr base before invoking
cmake -P cmake/boards.cmake
Instead boards.cmake uses find_package(Zephyr) to ensure consistent
behavior with Zephyr samples, so that the detection of Zephyr base is
uniform across CMake commands.
It also changes BOARD_ROOT_SPACE_SEPARATED to BOARD_ROOT in order to
be consistent with existing user documentation.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
With the introduction of ZephyrConfig.cmake all parts of CMake code
should rely on the CMake ZEPHYR_BASE variable instead of the environment
setting.
This ensures that after the first CMake invocation, then all subsequent
invocation in same build folder will use same zephyr base.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In order to make board listing reusable by external tools, split it out
from the usage helper script into a new boards.cmake that can also be
called directly with cmake -P.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>