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: register the print of current configuration #119

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions cmake/ProjectDefault.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ include(${CMAKE_CURRENT_LIST_DIR}/install/Default.cmake)
add_debug_macro()

create_uninstall_target()

# Show information about the current project
cmake_language(DEFER DIRECTORY ${CMAKE_SOURCE_DIR} CALL show_project_version)
cmake_language(DEFER DIRECTORY ${CMAKE_SOURCE_DIR} CALL
show_vcpkg_configuration)
cmake_language(DEFER DIRECTORY ${CMAKE_SOURCE_DIR} CALL show_installation)
17 changes: 9 additions & 8 deletions cmake/configure/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ endmacro()
#[[
Show vcpkg configurition
]]
macro(show_vcpkg_configuration)
message(STATUS "VCPKG_HOST_TRIPLET ${VCPKG_HOST_TRIPLET}")
message(STATUS "VCPKG_INSTALLED_DIR ${VCPKG_INSTALLED_DIR}")
message(STATUS "VCPKG_TARGET_TRIPLET ${VCPKG_TARGET_TRIPLET}")
message(STATUS "VCPKG_LIBRARY_LINKAGE ${VCPKG_LIBRARY_LINKAGE}")
message(STATUS "VCPKG_TARGET_IS_WINDOWS ${VCPKG_TARGET_IS_WINDOWS}")
message(STATUS "VCPKG_TARGET_IS_MINGW ${VCPKG_TARGET_IS_MINGW}")
endmacro()
function(show_vcpkg_configuration)
# Print all vcpkg variables
get_cmake_property(_vars VARIABLES)
foreach(_var IN LISTS _vars)
if(_var MATCHES "^VCPKG_")
message(STATUS "${_var} ${${_var}}")
endif()
endforeach()
endfunction()

#[[
Add definition _DEBUG with config type Debug
Expand Down
Loading