Deprecate ENABLE_TESTS, respect BUILD_TESTING

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • C Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      We define a CMake configuration toggle ENABLE_TESTS which toggles whether we build testing targets. CMake's default CTest module defines a toggle BUILD_TESTING which is the standard way to toggle test building within a CMake project.

      Additionally: the test target should not be EXCLUDE_FROM_ALL by default, as they exercise a lot of compile-time checks that are useful in general. If packagers/users want to exclude test-libmongoc from building, they should either set BUILD_TESTING=FALSE or name the targets they want to build.

      Additionally additionally: More targets should be properly gated behind BUILD_TESTING, rather than doing anything clever with EXCLUDE_FROM_ALL.

            Assignee:
            Unassigned
            Reporter:
            Colby Pike
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: