CMakeLists.txt 738 B

12345678910111213141516171819202122
  1. # SPDX-License-Identifier: Apache-2.0
  2. include (${ZEPHYR_BASE}/cmake/shields.cmake)
  3. include (${ZEPHYR_BASE}/cmake/boards.cmake)
  4. # shields.cmake and boards.cmake can be run with cmake -P for printing
  5. # help output on user error when settings BOARD or SHIELD, and
  6. # add_custom_target() is not available in script mode, so we place
  7. # them in here.
  8. add_custom_target(shields ${sorted_shield_cmds} USES_TERMINAL)
  9. add_custom_target(boards ${list_boards_commands} USES_TERMINAL)
  10. add_custom_target(
  11. usage
  12. ${CMAKE_COMMAND}
  13. -DZEPHYR_BASE=${ZEPHYR_BASE}
  14. -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
  15. -P ${CMAKE_CURRENT_SOURCE_DIR}/usage.cmake
  16. )
  17. # NB: The reason it is 'usage' and not help is that CMake already
  18. # defines a target 'help'