summaryrefslogtreecommitdiffstats
path: root/modules/TDEMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/TDEMacros.cmake')
-rw-r--r--modules/TDEMacros.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 223d9d2..95b8e16 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -831,3 +831,21 @@ macro( tde_conditional_add_subdirectory _cond _path )
endif( ${_cond} )
endmacro( tde_conditional_add_subdirectory )
+
+
+#################################################
+#####
+##### tde_save / tde_restore
+
+macro( tde_save )
+ foreach( _var ${ARGN} )
+ set( __bak_${_var} ${${_var}} )
+ endforeach()
+endmacro()
+
+macro( tde_restore )
+ foreach( _var ${ARGN} )
+ set( ${_var} ${__bak_${_var}} )
+ unset( __bak_${_var} )
+ endforeach()
+endmacro()