Skip to content

Commit

Permalink
Replace manual include guards with include_guard() (TriBITSPub#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlettroscoe committed Oct 22, 2021
1 parent bc14759 commit 1e3542d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@
# ************************************************************************
# @HEADER

if (__TribitsReportInvalidTribitsUsage_INCLUDED__)
return()
else()
set(__TribitsReportInvalidTribitsUsage_INCLUDED__ TRUE)
endif()
include_guard()

include(MessageWrapper)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@
# ************************************************************************
# @HEADER

if (TribitsTplFindIncludeDirsAndLibraries_INCLUDED)
return()
else()
set(TribitsTplFindIncludeDirsAndLibraries_INCLUDED TRUE)
endif()
include_guard()

include(AdvancedSet)
include(AppendSet)
Expand Down
6 changes: 1 addition & 5 deletions tribits/core/utils/MessageWrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@
# ************************************************************************
# @HEADER

if (MESSAGE_WRAPPER_INCLUDED)
return()
endif()
set(MESSAGE_WRAPPER_INCLUDED TRUE)
include_guard()

include(GlobalSet)

#
# @FUNCTION: message_wrapper()
#
# Function that wraps the standard CMake/CTest ``message()`` function call in
Expand Down
6 changes: 1 addition & 5 deletions tribits/core/utils/PrintVar.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@
# ************************************************************************
# @HEADER

if (PRINT_VAR_INCLUDED)
return()
endif()
set(PRINT_VAR_INCLUDED TRUE)
include_guard()

#
# @FUNCTION: print_var()
#
# Unconditionally print a variable giving its name then value.
Expand Down

0 comments on commit 1e3542d

Please sign in to comment.