Skip to content

Commit

Permalink
Use tribits_advanced_set_cache_var_and_default() for <Project>_SHOW_G…
Browse files Browse the repository at this point in the history
…IT_COMMIT_PARENTS (TriBITSPub#597)

We eventually need to use this for all of those vars to make that code more
compact.
  • Loading branch information
bartlettroscoe committed Jan 24, 2024
1 parent e30b76e commit 3bed1f9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3bed1f9

Please sign in to comment.