summaryrefslogtreecommitdiff
path: root/giscanner/msvccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: Add support for using clang-clChun-wei Fan2020-08-241-0/+22
| | | | | | | | | | | | | | | | | This adds quick support for using 'clang-cl' (CLang's emulation of the Visual Studio compiler) to run giscanner. This will still initialize things mostly in the MSVC fashion, except that it will also check whether both 'CC' and 'CXX' envvars are set to 'clang-cl [args]', as per the way that Meson supports using 'clang-cl'. Since we are using distutils to set up the compiler instance, when we enable 'clang-cl' support, we trick distutils that we have already initialized the MSVCCompiler parameters as needed. We just leave out the compiler flags as we don't really care about debug symbols nor optimization with the built dumper binary, as it is gone as soon as the .gir file is generated. This will build G-I successfully with all the tests passed.
* tests: depend on flake8 instead of including pep8/pyflakesChristoph Reiter2018-08-151-2/+1
| | | | | | | | | | | | | | | | g-i includes an old version of pep8 and pyflakes and uses that during "make check". It (1) doesn't catch all cases newer versions of pycodestyle/pyflakes catch and (2) doesn't test all Python files (3) doesn't work with meson. Instead of updating just remove them and depend on flake8 instead. To run the checks simply run flake8 in the root dir. This also makes it possible to run those checks when using meson and not autotools. To not get test suite failures on flake8 updates move the checks from "make check" to an extra "make check.quality" target.
* giscanner/msvccompiler.py: Fix exception handlingChun-wei Fan2016-02-191-1/+1
| | | | | | | | | | Fix the syntax where we handle the exception during preprocessing, so that we won't trigger a NameError when preprocessing fails, and so the error would become clearer to people. Reported by Cosimo Lupo. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* giscanner/msvccompiler.py: Make it compatible with Python 3.xChun-wei Fan2015-10-281-2/+2
| | | | | | This is checked for Python 2.7.x compatibility as well. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* sourcescanner.py: Use Distutils for PreprocessingChun-wei Fan2015-07-301-0/+101
Add a preprocess() function in ccompiler.py so that it will call the preprocess() method of the distutils.ccompiler class, and make use of it from sourcescanner.py. As we would need to set up the options (include paths, macros, undefs) to pass into the preprocessor (and later for the compiler), we have a new private function that translates what we have from the rest of giscanner so that it could be passed to distutils.ccompiler in a way that it understands. Also, as the MSVCCompiler classes in distutils do not provide a preprocess() implementation, we provide our own so that we can use it when preprocessing, via distutils, through subclassing MSVCCompiler. https://bugzilla.gnome.org/show_bug.cgi?id=728313