Thomas Psota | 94addb9 | 2019-03-12 16:16:18 +0100 | [diff] [blame] | 1 | ############################################### |
| 2 | ### diagnostics_print ### |
| 3 | ############################################### |
| 4 | ### |
| 5 | ### Prints different diagnostics and infos |
| 6 | ### about the specified target |
| 7 | ### |
| 8 | |
| 9 | function( diagnostics_print target_name ) |
Thomas Psota | 2319c81 | 2020-02-12 13:47:26 +0100 | [diff] [blame] | 10 | build_source_group(${target_name}) |
Thomas Psota | 94addb9 | 2019-03-12 16:16:18 +0100 | [diff] [blame] | 11 | |
| 12 | message(STATUS "${target_name} settings:") |
| 13 | message(STATUS "==============\n") |
| 14 | |
| 15 | message(STATUS "Source Files:") |
| 16 | get_target_property(SOURCE_FILES ${target_name} SOURCES) |
| 17 | if(SOURCE_FILES) |
| 18 | message(STATUS "${SOURCE_FILES}") |
| 19 | endif() |
| 20 | |
| 21 | message(STATUS "\nInclude Directories:") |
| 22 | get_target_property(HEADER_DIR ${target_name} INCLUDE_DIRECTORIES) |
| 23 | if(HEADER_DIR) |
| 24 | message(STATUS "${HEADER_DIR}") |
| 25 | endif() |
| 26 | |
| 27 | message(STATUS "\nLink Libraries:") |
| 28 | get_target_property(LINKED_LIBS ${target_name} LINK_LIBRARIES) |
| 29 | if(LINKED_LIBS) |
| 30 | message(STATUS "${LINKED_LIBS}") |
| 31 | endif() |
| 32 | |
| 33 | message(STATUS "\n") |
| 34 | endfunction() |