kerncraft/machinemodel.py
def get_compiler(self, compiler=None, flags=None):
        """
        Return tuple of compiler and compiler flags.

        Selects compiler and flags from machine description file, commandline arguments or call
        arguements.
        """
        if self._args:
            compiler = compiler or self._args.compiler
            flags = flags or self._args.compiler_flags
        if compiler is None:
            # Select first available compiler in machine description file's compiler dict
            for c in self['compiler'].keys():
                # Making sure compiler is available:
                if find_executable(c) is not None:
                    compiler = c
                    break
            else:
                raise RuntimeError("No compiler ({}) was found. Add different one in machine file, "
                                   "via --compiler argument or make sure it will be found in "
                                   "$PATH.".format(list(self['compiler'].keys())))
        if flags is None:
            # Select from machine description file
            flags = self['compiler'].get(compiler, '')

        return compiler, flags.split(' ')
def get_compiler(self, compiler=None, flags=None):
        if self._args:
            compiler = compiler or self._args.compiler
            flags = flags or self._args.compiler_flags
        if compiler is None:
            # Select first available compiler in machine description file's compiler dict
            for c in self['compiler'].keys():
                # Making sure compiler is available:
                if find_executable(c) is not None:
                    compiler = c
                    break
            else:
                raise RuntimeError("No compiler ({}) was found. Add different one in machine file, "
                                   "via --compiler argument or make sure it will be found in "
                                   "$PATH.".format(list(self['compiler'].keys())))
        if flags is None:
            # Select from machine description file
            flags = self['compiler'].get(compiler, '')

        return compiler, flags.split(' ')
def get_compiler ( self , compiler = None , flags = None ) : if self . _args : compiler = compiler or self . _args . compiler flags = flags or self . _args . compiler_flags if compiler is None : # Select first available compiler in machine description file's compiler dict for c in self [ 'compiler' ] . keys ( ) : # Making sure compiler is available: if find_executable ( c ) is not None : compiler = c break else : raise RuntimeError ( "No compiler ({}) was found. Add different one in machine file, " "via --compiler argument or make sure it will be found in " "$PATH." . format ( list ( self [ 'compiler' ] . keys ( ) ) ) ) if flags is None : # Select from machine description file flags = self [ 'compiler' ] . get ( compiler , '' ) return compiler , flags . split ( ' ' )
Return tuple of compiler and compiler flags.

        Selects compiler and flags from machine description file, commandline arguments or call
        arguements.
Return tuple of compiler and compiler flags .