Skip to content

CMake BUILD_TESTING option breaks usage of libcurl via FetchContent #15351

Description

@robertmaynard

I did this

The CMake variable BUILD_TESTING is used by the CMake include(CTest) to turn on tests globally ( https://cmake.org/cmake/help/latest/command/enable_testing.html ).

This means that projects shouldn't use cmake_dependent_option with BUILD_TESTING as that will force the variable to a given state and break other projects that consume libcurl via CMake's FetchContent

I expected the following

Easiest solution would be to rename BUILD_TESTING to CURL_ENABLE_TESTING or another variable that is prefixed with CURL_.

curl/libcurl version

curl master branch

operating system

Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions