]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/scripts/cmake/vcpkg_buildpath_length_warning.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / scripts / cmake / vcpkg_buildpath_length_warning.cmake
1 #[===[.md:
2 # vcpkg_buildpath_length_warning
3
4 Warns the user if their vcpkg installation path might be too long for the package they're installing.
5
6 ```cmake
7 vcpkg_buildpath_length_warning(<N>)
8 ```
9
10 `vcpkg_buildpath_length_warning` warns the user if the number of bytes in the
11 path to `buildtrees` is bigger than `N`. Note that this is simply a warning,
12 and isn't relied on for correctness.
13 #]===]
14
15 function(vcpkg_buildpath_length_warning warning_length)
16 string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length)
17 if(buildtrees_path_length GREATER warning_length AND CMAKE_HOST_WIN32)
18 message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n"
19 "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
20 )
21 endif()
22 endfunction()