From 13d9c8566cb938cec12fab3cf731409366dbf8f7 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Wed, 18 Dec 2019 07:27:03 +0100 Subject: [PATCH] Reduce relative path lengths to work around Visual Studio limitations #2272 --- waflib/Tools/ccroot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/waflib/Tools/ccroot.py b/waflib/Tools/ccroot.py index 579d5b2b..f4e1c841 100644 --- a/waflib/Tools/ccroot.py +++ b/waflib/Tools/ccroot.py @@ -121,7 +121,11 @@ def apply_incpaths(self): lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env.INCLUDES) self.includes_nodes = lst cwd = self.get_cwd() - self.env.INCPATHS = [x.path_from(cwd) for x in lst] + if Utils.is_win32: + # Visual Studio limitations + self.env.INCPATHS = [x.path_from(cwd) if x.is_child_of(self.bld.srcnode) else x.abspath() for x in lst] + else: + self.env.INCPATHS = [x.path_from(cwd) for x in lst] class link_task(Task.Task): """