diff options
author | Jeff Moguillansky <jmoguillansky@gopro.com> | 2021-02-04 10:07:12 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-02-04 13:05:17 -0800 |
commit | 9226a92fe0111bf84bdad0964e0381c31e5a2379 (patch) | |
tree | 1d56255a86ffa6eeb3ae34de844253abdd7841f7 /mesonbuild/backend/backends.py | |
parent | 7fd69cb4c4452b0dcaad7c2bb96f1e69188865e8 (diff) | |
download | meson-9226a92fe0111bf84bdad0964e0381c31e5a2379.zip meson-9226a92fe0111bf84bdad0964e0381c31e5a2379.tar.gz meson-9226a92fe0111bf84bdad0964e0381c31e5a2379.tar.bz2 |
xcode-backend: add implicit includes
Move helper functions get_source_dir_include_args and
get_build_dir_include_args to backend base class
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index badc2d0..f95ca4d 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -248,6 +248,17 @@ class Backend: return self.environment.coredata.validate_option_value(option_name, override) return self.environment.coredata.get_option(option_name.evolve(subproject=target.subproject)) + def get_source_dir_include_args(self, target, compiler): + curdir = target.get_subdir() + tmppath = os.path.normpath(os.path.join(self.build_to_src, curdir)) + return compiler.get_include_args(tmppath, False) + + def get_build_dir_include_args(self, target, compiler): + curdir = target.get_subdir() + if curdir == '': + curdir = '.' + return compiler.get_include_args(curdir, False) + def get_target_filename_for_linking(self, target): # On some platforms (msvc for instance), the file that is used for # dynamic linking is not the same as the dynamic library itself. This |