Skip to content

Commit 8fb2467

Browse files
Michael SchwarczOren Cohen
authored andcommitted
Force adding mbed-os root to include dirs
1 parent 3252530 commit 8fb2467

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/resources/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from copy import copy
3939
from itertools import chain
4040
from os import walk, sep
41-
from os.path import (join, splitext, dirname, relpath, basename, split, normcase,
41+
from os.path import (join, splitext, dirname, relpath, basename, split, normpath,
4242
abspath, exists)
4343

4444
from .ignore import MbedIgnoreSet, IGNORE_FILENAME
@@ -148,6 +148,11 @@ def __init__(self, notify, collect_ignores=False):
148148

149149
self._ignoreset = MbedIgnoreSet()
150150

151+
# make sure mbed-os root is added as include directory
152+
script_dir = dirname(abspath(__file__))
153+
mbed_os_root_dir = normpath(join(script_dir, '..', '..'))
154+
self.add_file_ref(FileType.INC_DIR, mbed_os_root_dir, mbed_os_root_dir)
155+
151156
def ignore_dir(self, directory):
152157
if self._collect_ignores:
153158
self.ignored_dirs.append(directory)

0 commit comments

Comments
 (0)