From 3bed1f945b5b419d5a5587e2ac28a6d836a8595c Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Tue, 23 Jan 2024 18:53:12 -0700 Subject: [PATCH] Use tribits_advanced_set_cache_var_and_default() for _SHOW_GIT_COMMIT_PARENTS (#597) We eventually need to use this for all of those vars to make that code more compact. --- tribits/core/package_arch/TribitsGlobalMacros.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tribits/core/package_arch/TribitsGlobalMacros.cmake b/tribits/core/package_arch/TribitsGlobalMacros.cmake index 1830ef076..83c60cd5b 100644 --- a/tribits/core/package_arch/TribitsGlobalMacros.cmake +++ b/tribits/core/package_arch/TribitsGlobalMacros.cmake @@ -686,13 +686,8 @@ macro(tribits_define_global_options_and_define_extra_repos) CACHE BOOL "Generate the ${PROJECT_NAME}RepoVersion.txt file.") - if ("${${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS_DEFAULT}" STREQUAL "") - set(${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS_DEFAULT OFF) - endif() - advanced_set(${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS - ${${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS_DEFAULT} - CACHE BOOL - "Show parents' commit info in the repo version output.") + tribits_advanced_set_cache_var_and_default(${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS + BOOL OFF "Show parents' commit info in the repo version output.") if ("${${PROJECT_NAME}_GENERATE_VERSION_DATE_FILES_DEFAULT}" STREQUAL "") set(${PROJECT_NAME}_GENERATE_VERSION_DATE_FILES_DEFAULT OFF)