Skip to content

Commit

Permalink
perf: register the print of current configuration
Browse files Browse the repository at this point in the history
Signed-off-by: msclock <msclock@qq.com>
  • Loading branch information
msclock committed Sep 2, 2024
1 parent 6123348 commit 44d622d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
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

0 comments on commit 44d622d

Please sign in to comment.