diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2018-12-30 13:37:41 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-06 12:19:32 +0100 |
commit | 97429279031d9b9f0ad9e2e66511c67d2dd0c6a0 (patch) | |
tree | a20c483fc3b3c836d9f1bdb45d26022d7c137b01 /mesonbuild/compilers/c.py | |
parent | 2487e0a1fbf8ac33b95467f7428afd78a39537ed (diff) | |
download | meson-97429279031d9b9f0ad9e2e66511c67d2dd0c6a0.zip meson-97429279031d9b9f0ad9e2e66511c67d2dd0c6a0.tar.gz meson-97429279031d9b9f0ad9e2e66511c67d2dd0c6a0.tar.bz2 |
Absolute path generation refactoring
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 92a9fa6..6350eee 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1475,6 +1475,15 @@ class VisualStudioCCompiler(CCompiler): # msvc does not have a concept of system header dirs. return ['-I' + path] + def compute_parameters_with_absolute_paths(self, parameter_list, build_dir): + for idx, i in enumerate(parameter_list): + if i[:2] == '-I' or i[:2] == '/I': + parameter_list[idx] = i[:2] + os.path.normpath(os.path.join(build_dir, i[2:])) + elif i[:9] == '/LIBPATH:': + parameter_list[idx] = i[:9] + os.path.normpath(os.path.join(build_dir, i[9:])) + + return parameter_list + # Visual Studio is special. It ignores some arguments it does not # understand and you can't tell it to error out on those. # http://stackoverflow.com/questions/15259720/how-can-i-make-the-microsoft-c-compiler-treat-unknown-flags-as-errors-rather-t |