shields.cmake 620 B

123456789101112131415161718
  1. if(CMAKE_SCRIPT_MODE_FILE AND NOT CMAKE_PARENT_LIST_FILE)
  2. # This file was invoked as a script directly with -P:
  3. # cmake -P shields.cmake
  4. #
  5. # Unlike boards.cmake, this takes no OUTPUT_FILE option, but
  6. # SHIELD_LIST_SPACE_SEPARATED is required.
  7. list(SORT SHIELD_LIST)
  8. foreach(shield ${SHIELD_LIST})
  9. message("${shield}")
  10. endforeach()
  11. else()
  12. # This file was included into usage.cmake.
  13. set(sorted_shield_list ${SHIELD_LIST})
  14. list(SORT sorted_shield_list)
  15. foreach(shield ${sorted_shield_list})
  16. list(APPEND sorted_shield_cmds COMMAND ${CMAKE_COMMAND} -E echo "${shield}")
  17. endforeach()
  18. endif()