How to use the autoconfig.cxx_parsers_cfg.gccxml.compiler function in autoconfig

To help you get started, we’ve selected a few autoconfig examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gccxml / pygccxml / unittests / undname_creator_tester.py View on Github external
def setUp(self):
        if not tester_t.global_ns:
            decls = parser.parse([self.header], self.config)
            tester_t.global_ns = declarations.get_global_namespace(decls)
            tester_t.global_ns.init_optimizer()

            process = subprocess.Popen(
                args='scons msvc_compiler=%s' %
                autoconfig.cxx_parsers_cfg.gccxml.compiler,
                shell=True,
                stdin=subprocess.PIPE,
                stdout=subprocess.PIPE,
                stderr=subprocess.STDOUT,
                cwd=self.binary_parsers_dir)
            process.stdin.close()

            while process.poll() is None:
                line = process.stdout.readline()
                print(line.rstrip())
            for line in process.stdout.readlines():
                print(line.rstrip())
            if process.returncode:
                raise RuntimeError(
                    ("unable to compile binary parser module. " +
                        "See output for the errors."))