cmake_modules/utils.cmake
changeset 9224 bce8cf41d666
parent 9220 5e7db24f3489
parent 8794 9f47c1f8056d
child 9225 d8d929f92633
--- a/cmake_modules/utils.cmake	Thu Jun 13 22:04:22 2013 +0200
+++ b/cmake_modules/utils.cmake	Thu Jun 13 22:27:23 2013 +0200
@@ -35,3 +35,12 @@
 
 #TODO: find_package_or_bundle
 
+
+macro(add_flag_append _VAR_NAME _FLAG)
+    set(${_VAR_NAME} "${${_VAR_NAME}} ${_FLAG}")
+endmacro(add_flag_append _VAR_NAME _FLAG)
+
+macro(add_flag_prepend _VAR_NAME _FLAG)
+    set(${_VAR_NAME} "${_FLAG} ${${_VAR_NAME}}")
+endmacro(add_flag_prepend _VAR_NAME _FLAG)
+