aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2018-12-30 13:37:41 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-06 12:19:32 +0100
commit97429279031d9b9f0ad9e2e66511c67d2dd0c6a0 (patch)
treea20c483fc3b3c836d9f1bdb45d26022d7c137b01 /mesonbuild/compilers/d.py
parent2487e0a1fbf8ac33b95467f7428afd78a39537ed (diff)
downloadmeson-97429279031d9b9f0ad9e2e66511c67d2dd0c6a0.zip
meson-97429279031d9b9f0ad9e2e66511c67d2dd0c6a0.tar.gz
meson-97429279031d9b9f0ad9e2e66511c67d2dd0c6a0.tar.bz2
Absolute path generation refactoring
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r--mesonbuild/compilers/d.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 2cf0fbd..a3e3369 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -111,6 +111,13 @@ class DCompiler(Compiler):
def get_include_args(self, path, is_system):
return ['-I=' + path]
+ def compute_parameters_with_absolute_paths(self, parameter_list, build_dir):
+ for idx, i in enumerate(parameter_list):
+ if i[:3] == '-I=':
+ parameter_list[idx] = i[:3] + os.path.normpath(os.path.join(build_dir, i[3:]))
+
+ return parameter_list
+
def get_warn_args(self, level):
return ['-wi']
@@ -511,6 +518,13 @@ class GnuDCompiler(DCompiler):
def get_buildtype_args(self, buildtype):
return d_gdc_buildtype_args[buildtype]
+ def compute_parameters_with_absolute_paths(self, parameter_list, build_dir):
+ for idx, i in enumerate(parameter_list):
+ if i[:2] == '-I':
+ parameter_list[idx] = i[:2] + os.path.normpath(os.path.join(build_dir, i[2:]))
+
+ return parameter_list
+
def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, build_rpath, install_rpath)