fmtlib / fmt

A modern formatting library
https://fmt.dev
Other
19.83k stars 2.42k forks source link

Not possible to fetch fmt with CMake #4011

Closed asamitov closed 3 weeks ago

asamitov commented 3 weeks ago

After #3998 fetching fmt with CMake fails with the following error:

CMake Error at build_/_deps/fmt-src/CMakeLists.txt:407 (install):
install TARGETS given unknown argument "FILE_SET".

CMake section to reproduce

 FetchContent_Declare(fmt
        GIT_REPOSITORY https://github.com/fmtlib/fmt.git
        GIT_TAG master
    )
 FetchContent_MakeAvailable(fmt)
vitaut commented 3 weeks ago

I think we should guard FILE_SET with a CMake version check. cc @yujincheng08.

rtiangha commented 3 weeks ago

Same here. This came from a build bot using cmake 3.22.1-g37088a8.

  CMake Error at externals/fmt/CMakeLists.txt:407 (install):
    install TARGETS given unknown argument "FILE_SET".