@@ -33,7 +33,7 @@ option (ENABLE_CRYPTO_SYSTEM_PROFILE "Use system crypto profile (OpenSSL only)"
33
33
option (ENABLE_TRACING "Turn on verbose debug output" OFF )
34
34
option (ENABLE_COVERAGE "Turn on compile options for lcov" OFF )
35
35
set (ENABLE_SHM_COUNTERS AUTO CACHE STRING "Enable shared memory performance counters. Set to ON/AUTO/OFF, default AUTO." )
36
- set (ENABLE_BSON AUTO CACHE STRING "Where to find libbson. Set to BUNDLED/SYSTEM/AUTO, default AUTO." )
36
+ set (ENABLE_BSON AUTO CACHE STRING "Where to find libbson. Set to BUNDLED/SYSTEM/AUTO/ONLY , default AUTO." )
37
37
set (ENABLE_SNAPPY AUTO CACHE STRING "Enable snappy support. Set to ON/AUTO/OFF, default AUTO." )
38
38
set (ENABLE_ZLIB AUTO CACHE STRING "Enable zlib support" )
39
39
option (ENABLE_MAN_PAGES "Build MongoDB C Driver manual pages." OFF )
@@ -76,7 +76,7 @@ else ()
76
76
set (BSON_EXTRA_ALIGN 0 )
77
77
endif ()
78
78
79
- if (NOT ENABLE_BSON MATCHES "SYSTEM|AUTO|BUNDLED" )
79
+ if (NOT ENABLE_BSON MATCHES "SYSTEM|AUTO|BUNDLED|ONLY " )
80
80
message (FATAL_ERROR "ENABLE_BSON option must be SYSTEM, BUNDLED, or AUTO" )
81
81
endif ()
82
82
@@ -140,6 +140,11 @@ if (NOT BSON_LIBRARIES)
140
140
set (BSON_STATIC_DEFINITIONS "BSON_STATIC" )
141
141
endif ()
142
142
143
+ # This allows skipping all the non-bson components
144
+ if (ENABLE_BSON STREQUAL ONLY )
145
+ return ()
146
+ endif ()
147
+
143
148
if (ENABLE_TESTS AND NOT MONGOC_ENABLE_STATIC )
144
149
message (FATAL_ERROR "ENABLE_TESTS requires ENABLE_STATIC" )
145
150
endif ()
0 commit comments