Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1462

Adding -Werror on CMake command line inhibits DEPRECATED macro

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • None

      If you have -Werror in CMAKE_CXX_FLAGS, it causes the detection of support for _attribute_((deprecated)) to misfire, resulting in CMake deciding that the compiler doesn't offer it, meaning that you don't get errors for use of (un-suppressed) deprecations.

      The fix is to explicitly pass -DCOMPILER_HAS_DEPRECATED_ATTR:Bool=true on the CMake line as well.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: