Skip to content

Commit

Permalink
Remove duplication in tribits_advanced_set_cache_var_and_default() (#582
Browse files Browse the repository at this point in the history
)

Now just calls tribits_set_cache_var_and_default() then mark_as_advanced().

Suggested by @KyleFromKitware
  • Loading branch information
bartlettroscoe committed Sep 21, 2023
1 parent e507636 commit 4d848d8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tribits/core/utils/TribitsSetCacheVarAndDefault.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ include_guard()
macro(tribits_advanced_set_cache_var_and_default cacheVarName cacheVarType
defaultDefaultVal docString
)
if ("${${cacheVarName}_DEFAULT}" STREQUAL "")
set(${cacheVarName}_DEFAULT "${defaultDefaultVal}")
endif()
set(${cacheVarName} "${${cacheVarName}_DEFAULT}"
CACHE ${cacheVarType}
"${docString}" )
tribits_set_cache_var_and_default("${cacheVarName}" "${cacheVarType}"
"${defaultDefaultVal}" "${docString}")
mark_as_advanced(${cacheVarName})
endmacro()

Expand Down

0 comments on commit 4d848d8

Please sign in to comment.