parent
f502170cbe
commit
4929d8f0d3
20
utils.cmake
20
utils.cmake
|
@ -1380,3 +1380,23 @@ function(query_qt_library_info)
|
|||
set(${QT_ARGS_VERSION} "${QT_VERSION}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(dump_target_info)
|
||||
cmake_parse_arguments(arg "" "" "TARGETS" ${ARGN})
|
||||
if(NOT arg_TARGETS)
|
||||
message(AUTHOR_WARNING "dump_target_info: you have to specify at least one target!")
|
||||
return()
|
||||
endif()
|
||||
foreach(__target ${arg_TARGETS})
|
||||
if(NOT TARGET ${__target})
|
||||
message(AUTHOR_WARNING "${__target} is not a valid CMake target!")
|
||||
continue()
|
||||
endif()
|
||||
get_target_property(__compile_options ${__target} COMPILE_OPTIONS)
|
||||
get_target_property(__compile_definitions ${__target} COMPILE_DEFINITIONS)
|
||||
get_target_property(__link_options ${__target} LINK_OPTIONS)
|
||||
message("${__target}'s compile options: ${__compile_options}")
|
||||
message("${__target}'s compile definitions: ${__compile_definitions}")
|
||||
message("${__target}'s link options: ${__link_options}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
|
Loading…
Reference in New Issue