Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: add print print_target_properties #125

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions cmake/configure/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,134 @@ function(target_include_interface_directories target)
target_include_directories(${target} PUBLIC ${_includes})
endif()
endfunction()

#[[
A function to print a target's properties.

Example:

print_target_properties(my_target)

]]
function(print_target_properties target)
include(CMakePrintHelpers)
#cmake-format: off
cmake_print_properties(
TARGETS ${target}
PROPERTIES IMPORTED
IMPORTED_COMMON_LANGUAGE_RUNTIME
IMPORTED_CONFIGURATIONS
IMPORTED_GLOBAL
IMPORTED_IMPLIB
IMPORTED_IMPLIB_Debug
IMPORTED_IMPLIB_Release
IMPORTED_LIBNAME
IMPORTED_LIBNAME_Debug
IMPORTED_LIBNAME_Release
IMPORTED_LINK_DEPENDENT_LIBRARIES
IMPORTED_LINK_DEPENDENT_LIBRARIES_Debug
IMPORTED_LINK_DEPENDENT_LIBRARIES_Release
IMPORTED_LINK_INTERFACE_LANGUAGES
IMPORTED_LINK_INTERFACE_LANGUAGES_Debug
IMPORTED_LINK_INTERFACE_LANGUAGES_Release
IMPORTED_LINK_INTERFACE_LIBRARIES
IMPORTED_LINK_INTERFACE_LIBRARIES_Debug
IMPORTED_LINK_INTERFACE_LIBRARIES_Release
IMPORTED_LINK_INTERFACE_MULTIPLICITY
IMPORTED_LINK_INTERFACE_MULTIPLICITY_Debug
IMPORTED_LINK_INTERFACE_MULTIPLICITY_Release
IMPORTED_LOCATION
IMPORTED_LOCATION_Debug
IMPORTED_LOCATION_Release
IMPORTED_NO_SONAME
IMPORTED_NO_SONAME_Debug
IMPORTED_NO_SONAME_Release
IMPORTED_OBJECTS
IMPORTED_OBJECTS_Debug
IMPORTED_OBJECTS_Release
IMPORTED_SONAME
IMPORTED_SONAME_Debug
IMPORTED_SONAME_Release
IMPORT_PREFIX
IMPORT_SUFFIX
INCLUDE_DIRECTORIES
INSTALL_NAME_DIR
INSTALL_REMOVE_ENVIRONMENT_RPATH
INSTALL_RPATH
INSTALL_RPATH_USE_LINK_PATH
INTERFACE_AUTOUIC_OPTIONS
INTERFACE_COMPILE_DEFINITIONS
INTERFACE_COMPILE_FEATURES
INTERFACE_COMPILE_OPTIONS
INTERFACE_INCLUDE_DIRECTORIES
INTERFACE_LINK_DEPENDS
INTERFACE_LINK_DIRECTORIES
INTERFACE_LINK_LIBRARIES
INTERFACE_LINK_OPTIONS
INTERFACE_POSITION_INDEPENDENT_CODE
INTERFACE_PRECOMPILE_HEADERS
INTERFACE_SOURCES
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
LIBRARY_OUTPUT_DIRECTORY
LIBRARY_OUTPUT_DIRECTORY_Debug
LIBRARY_OUTPUT_DIRECTORY_Release
LIBRARY_OUTPUT_NAME
LIBRARY_OUTPUT_NAME_Debug
LIBRARY_OUTPUT_NAME_Release
LINK_DEPENDS
LINK_DEPENDS_NO_SHARED
LINK_DIRECTORIES
LINK_FLAGS
LINK_FLAGS_Debug
LINK_FLAGS_Release
LINK_INTERFACE_LIBRARIES
LINK_INTERFACE_LIBRARIES_Debug
LINK_INTERFACE_LIBRARIES_Release
LINK_INTERFACE_MULTIPLICITY
LINK_INTERFACE_MULTIPLICITY_Debug
LINK_INTERFACE_MULTIPLICITY_Release
LINK_LIBRARIES
LINK_OPTIONS
LOCATION
LOCATION_Debug
LOCATION_Release
MANUALLY_ADDED_DEPENDENCIES
MSVC_RUNTIME_LIBRARY
NAME
NO_SONAME
NO_SYSTEM_FROM_IMPORTED
OUTPUT_NAME
OUTPUT_NAME_Debug
OUTPUT_NAME_Release
PCH_WARN_INVALID
PCH_INSTANTIATE_TEMPLATES
PDB_NAME
PDB_NAME_Debug
PDB_NAME_Release
PDB_OUTPUT_DIRECTORY
PDB_OUTPUT_DIRECTORY_Debug
PDB_OUTPUT_DIRECTORY_Release
PRECOMPILE_HEADERS
PRECOMPILE_HEADERS_REUSE_FROM
PREFIX
PRIVATE_HEADER
PUBLIC_HEADER
RESOURCE
RUNTIME_OUTPUT_DIRECTORY
RUNTIME_OUTPUT_DIRECTORY_Debug
RUNTIME_OUTPUT_DIRECTORY_Release
RUNTIME_OUTPUT_NAME
RUNTIME_OUTPUT_NAME_Debug
RUNTIME_OUTPUT_NAME_Release
SOURCE_DIR
SOURCES
STATIC_LIBRARY_FLAGS
STATIC_LIBRARY_FLAGS_Debug
STATIC_LIBRARY_FLAGS_Release
STATIC_LIBRARY_OPTIONS
SUFFIX
TYPE
VERSION
)
#cmake-format: on
endfunction()
Loading