summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/cfl/cmake/macros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/cfl/cmake/macros.cmake')
-rw-r--r--fluent-bit/lib/cfl/cmake/macros.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/fluent-bit/lib/cfl/cmake/macros.cmake b/fluent-bit/lib/cfl/cmake/macros.cmake
new file mode 100644
index 00000000..bbbd09be
--- /dev/null
+++ b/fluent-bit/lib/cfl/cmake/macros.cmake
@@ -0,0 +1,10 @@
+# Macro to set definitions
+macro(CFL_DEFINITION var)
+ add_definitions(-D${var})
+ set(CFL_BUILD_FLAGS "${CFL_BUILD_FLAGS}#ifndef ${var}\n#define ${var}\n#endif\n")
+ set(CFL_INFO_FLAGS "${CFL_INFO_FLAGS} ${var}")
+endmacro()
+
+macro(CFL_OPTION option value)
+ set(${option} ${value} CACHE INTERNAL "" FORCE)
+endmacro()