Force adding mbed-os root to include dirs

pull/9652/head
Michael Schwarcz 2019-01-13 15:58:27 +02:00 committed by Oren Cohen
parent 3252530e3a
commit 8fb2467608
1 changed files with 6 additions and 1 deletions

View File

@ -38,7 +38,7 @@ from collections import namedtuple, defaultdict
from copy import copy
from itertools import chain
from os import walk, sep
from os.path import (join, splitext, dirname, relpath, basename, split, normcase,
from os.path import (join, splitext, dirname, relpath, basename, split, normpath,
abspath, exists)
from .ignore import MbedIgnoreSet, IGNORE_FILENAME
@ -148,6 +148,11 @@ class Resources(object):
self._ignoreset = MbedIgnoreSet()
# make sure mbed-os root is added as include directory
script_dir = dirname(abspath(__file__))
mbed_os_root_dir = normpath(join(script_dir, '..', '..'))
self.add_file_ref(FileType.INC_DIR, mbed_os_root_dir, mbed_os_root_dir)
def ignore_dir(self, directory):
if self._collect_ignores:
self.ignored_dirs.append(directory)