diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt index 8bceccac4a1d..df7966b1cacc 100644 --- a/polly/lib/External/CMakeLists.txt +++ b/polly/lib/External/CMakeLists.txt @@ -339,3 +339,9 @@ else () COMPILE_FLAGS "-w" ) endif () + +if(MSVC) + # In the Windows API (with some exceptions), the maximum length for a path is + # MAX_PATH, which is defined as 260 characters. + target_compile_definitions(PollyPPCG PUBLIC "-DPATH_MAX=260") +endif ()