tomsfastmath/cmake/functions.cmake

14 lines
687 B
CMake
Raw Normal View History

2023-05-13 09:44:49 +02:00
# ##############################################################################
# cmake function library
# ##############################################################################
# Taken from https://jeremimucha.com/2021/01/cmake-fundamentals-part3/
# See also https://jeremimucha.com/2021/02/cmake-functions-and-macros/
function(PrintTargetLibraries target msg)
get_target_property(linkedLibs ${target} LINK_LIBRARIES)
get_target_property(interfaceLibs ${target} INTERFACE_LINK_LIBRARIES)
message(STATUS "${msg}")
message(STATUS "${target} LINK_LIBRARIES: ${linkedLibs}")
message(STATUS "${target} INTERFACE_LINK_LIBRARIES: ${interfaceLibs}")
endfunction()