Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-12564

Improve cmake messaging when a build_type isn't available

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Storage Engines
    • 5
    • StorEng - Defined Pipeline

      Currently when we build WiredTiger with

      -DCMAKE_BUILD_TYPE=TSan
      -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_stable_gcc.cmake 

      we get the error

      CMake Error at cmake/configs/modes.cmake:199 (message):
        Build type 'TSan' not available.
      Call Stack (most recent call first):
        CMakeLists.txt:14 (include) 

      If we run cmake with --log-level=VERBOSE this is because our gcc version is missing required C flags:

      Skipping build mode definition due to unavailable C flags: TSan 

      however this is not clear from a default run of CMake.

      This ticket is to improve the error reporting of CMake. If the define_build_mode function fails to add our specified build mode Cmake should report this clearly in the failure message.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: