Skip to content

FetchContent only introduced in CMake >= 3.11 #360

@mitchallain

Description

@mitchallain

It seems like the FetchContent cmake module was introduced in CMake >= 3.11, however the CMakeLists.txt cites version 3.5.1 as the minimum, and notably ubuntu bionic package repositories only provide 3.10.

Introduced in commit 617743b just prior to 3.6.1 release.

elseif(BUILD_UNIT_TESTS)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions