blob: c3cc6d0f6d8613a0ee5be58a93924f7265c34a92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#[===[.md:
# vcpkg_buildpath_length_warning
Warns the user if their vcpkg installation path might be too long for the package they're installing.
## Usage
```cmake
vcpkg_buildpath_length_warning(13)
```
#]===]
function(vcpkg_buildpath_length_warning WARNING_LENGTH)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
if(BUILDTREES_PATH_LENGTH GREATER ${WARNING_LENGTH} AND CMAKE_HOST_WIN32)
message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
endif()
endfunction()
|