summaryrefslogtreecommitdiff
path: root/cmake/misc.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/misc.cmake')
-rw-r--r--cmake/misc.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/misc.cmake b/cmake/misc.cmake
index 928c33fd8d2..2a0c57b1973 100644
--- a/cmake/misc.cmake
+++ b/cmake/misc.cmake
@@ -11,3 +11,9 @@ ELSE()
SET(__msg1_${id} ${hash} CACHE INTERNAL "")
ENDFUNCTION()
ENDIF()
+
+MACRO(SET_IF_UNSET VAR VAL)
+ IF(NOT DEFINED ${VAR})
+ SET(${VAR} ${VAL})
+ ENDIF()
+ENDMACRO()