Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2324

CMake config doesn't set MONGOC_ENABLE_COMPRESSION in mongoc-config.h

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.2, 1.9.0
    • Affects Version/s: 1.8.0
    • Component/s: Build, cmake, libmongoc
    • Labels:
      None

      In CMakeLists.txt for libmongoc, we first generate mongoc-config.h:

      configure_file (
         "${SOURCE_DIR}/src/mongoc/mongoc-config.h.in"
         "${PROJECT_BINARY_DIR}/src/mongoc/mongoc-config.h"
      )
      

      and then handle MONGOC_ENABLE_COMPRESSION:

      if (ENABLE_SNAPPY STREQUAL "bundled")
         set (MONGOC_ENABLE_COMPRESSION 1)
         set (MONGOC_ENABLE_COMPRESSION_SNAPPY 1)
         include(FindSnappy)
      endif ()
      

      The configure_file call must come after all the variables it needs are set.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: