@@ -24,7 +24,18 @@ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
24
24
OUTPUT_STRIP_TRAILING_WHITESPACE
25
25
)
26
26
if (BREW_BISON EQUAL 0 AND EXISTS "${BREW_BISON_PREFIX} " )
27
- message (STATUS "Found Bison keg installed by Homebrew at ${BREW_BISON_PREFIX} " )
27
+ message (STATUS "include <ctype.h>
28
+ #include <errno.h>
29
+ #include <math.h>
30
+ #include <stdarg.h>
31
+ #include <stdint.h>
32
+
33
+ #include <cmetrics/cmetrics.h>
34
+ #include <cmetrics/cmt_gauge.h>
35
+ #include <cmetrics/cmt_untyped.h>
36
+ #include <cmetrics/cmt_histogram.h>
37
+ #include <cmetrics/cmt_summary.h>
38
+ #include <cmetrics/cmt_counter.h>Found Bison keg installed by Homebrew at ${BREW_BISON_PREFIX} " )
28
39
set (BISON_EXECUTABLE "${BREW_BISON_PREFIX} /bin/bison" )
29
40
endif ()
30
41
@@ -68,11 +79,11 @@ else()
68
79
endif ()
69
80
70
81
# Configuration options
71
- option (CMT_DEV "Enable development mode" No )
72
- option (CMT_DEBUG "Enable debug mode" No )
73
- option (CMT_TESTS "Enable unit testing" No )
82
+ option (CMT_DEV "Enable development mode" No )
83
+ option (CMT_DEBUG "Enable debug mode" No )
84
+ option (CMT_TESTS "Enable unit testing" No )
74
85
option (CMT_INSTALL_TARGETS "Enable subdirectory library installations" Yes )
75
- option (CMT_ENABLE_PROMETHEUS_DECODER "Enable prometheus decoder" Yes )
86
+ option (CMT_PROMETHEUS_TEXT_DECODER "Enable prometheus text format decoder (requires Flex/Bison)" Yes )
76
87
77
88
if (CMT_DEV )
78
89
set (CMT_TESTS Yes )
@@ -155,7 +166,7 @@ check_c_source_compiles("
155
166
return 0;
156
167
}" CMT_HAVE_MSGPACK )
157
168
158
- if (CMT_ENABLE_PROMETHEUS_DECODER )
169
+ if (CMT_PROMETHEUS_TEXT_DECODER )
159
170
# Flex and Bison: check if the variables has not been defined before by
160
171
# a parent project to avoid conflicts.
161
172
if (NOT FLEX_FOUND )
@@ -167,7 +178,8 @@ if(CMT_ENABLE_PROMETHEUS_DECODER)
167
178
endif ()
168
179
169
180
if (FLEX_FOUND AND BISON_FOUND )
170
- set (CMT_BUILD_PROMETHEUS_DECODER 1 )
181
+ set (CMT_BUILD_PROMETHEUS_TEXT_DECODER 1 )
182
+ CMT_DEFINITION (CMT_HAVE_PROMETHEUS_TEXT_DECODER )
171
183
endif ()
172
184
endif ()
173
185
0 commit comments