Fix bug include_directories([p1,p2]) produces -Ip2 -Ip1 (reversed order)

pull/2976/head
Maxim Dzabraev 7 years ago
parent 47508e217f
commit d10b7687ab
  1. 5
      mesonbuild/backend/ninjabackend.py

@ -2106,7 +2106,10 @@ rule FORTRAN_DEP_HACK
# Hence, we must reverse the list so that the order is preserved.
for i in reversed(target.get_include_dirs()):
basedir = i.get_curdir()
for d in i.get_incdirs():
# We should iterate include dirs in reversed orders because
# -Ipath will add to begin of array. And without reverse
# flags will be added in reversed order.
for d in reversed(i.get_incdirs()):
# Avoid superfluous '/.' at the end of paths when d is '.'
if d not in ('', '.'):
expdir = os.path.join(basedir, d)

Loading…
Cancel
Save