From 5860aef6759f5b49ae33463a3ef398d0e9867fd3 Mon Sep 17 00:00:00 2001 From: Hongbin Zheng Date: Fri, 7 Oct 2016 20:58:20 +0000 Subject: [PATCH] Define PATH_MAX on windows Differential Revision: https://reviews.llvm.org/D25372 llvm-svn: 283600 --- polly/lib/External/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) 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 ()