PyXMake Developer Guide 1.0
PyXMake
Loading...
Searching...
No Matches
PyXMake.Build.Make.CCxx Class Reference

Base class for all C/C++ build events inherited from Make. More...

Inheritance diagram for PyXMake.Build.Make.CCxx:
PyXMake.Build.Make.Make PyXMake.Build.Make.NT PyXMake.Build.Make.POSIX PyXMake.Tools.Utility.AbstractBase PyXMake.Build.Make.OS PyXMake.Build.Make.OS PyXMake.Tools.Utility.AbstractBase PyXMake.Tools.Utility.AbstractBase

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 OutputPath (self, libpath=os.getcwd())
 
 Build (self, cmdstring, **kwargs)
 
 parse (cls, **kwargs)
 
 create (self)
 
- Public Member Functions inherited from PyXMake.Build.Make.Make
 __posix__ (self, **kwargs)
 
 AddIncludePath (self, includes)
 
 AddDependencyPath (self, dependencies)
 
 UseLibraries (self, libs)
 
 SourcePath (self, path)
 
 Environment (self, path, script="ifortvars.bat")
 
 Preprocessing (self, cmdstring='', inend='', outend='', copyfiles=[], replace={'!DEC$ IF':'#IF','!DEC$ ELSE':'#ELSE','!DEC$ ENDIF':'#ENDIF'})
 
 Postprocessing (self, cmdstring='')
 
 run (cls, **kwargs)
 
- Public Member Functions inherited from PyXMake.Tools.Utility.AbstractBase
 __new__ (cls, *args, **kwargs)
 
 recover (cls, *args)
 
 classify (cls, *args, **kwargs)
 
 jsonify (self)
 
 update (self, **kwargs)
 
 __repr__ (self)
 
 __str__ (self)
 
 __getstate__ (self)
 
 __setstate__ (self, _dict)
 
- Public Member Functions inherited from PyXMake.Build.Make.NT
- Public Member Functions inherited from PyXMake.Build.Make.OS
- Public Member Functions inherited from PyXMake.Build.Make.POSIX
 __create__ (self, **kwargs)
 

Public Attributes

str MakeObjectKind = 'CCxx'
 String identifier of current instance.
 
str exe = "gcc"
 The executable command used in the main build event.
 
bool isStatic = True if kwargs.get('lib', 'static') not in ['shared', 'SHARED', 'Shared'] else False
 Static or dynamic link library flag.
 
 incremental = kwargs.get('incremental', False)
 Define if the input should be compiled exactly as provided.
 
str incremental = ' -c %s' % (' '.join(self.srcs))
 
 libname = self.buildid + self.architecture
 Name of library, assembled using BuildID.
 
 buildname = self.libname
 Temporary build name.
 
list linkedIn = []
 List of libraries which should be statically linked in.
 
tuple temps = ()
 Blank version of tuple to store temporary file names scheduled for removal.
 
list libdirs = []
 Blank version of list containing library directories without initially specifying MKL.
 
 hasFoss
 
 outlibs = libpath
 Output path for library files.
 
# pragma no cover isStatic = 'link -dll -fixed:no -defaultlib:libcmt.lib -nodefaultlib:msvcrt.lib '
 
 compargs = cmdstring
 Used defined command line options.
 
str makecmd = self.iniCompiler+" "
 Intel Compiler command.
 
str linkcmd = librarian +'*.obj -nologo -machine:'+self.architecture+' -out:'+os.path.join(self.outlibs,self.libname+ext)
 Intel Linker command.
 
 scrtdir
 
 precmd = '':
 
 verbose
 
 postcmd = '':
 
- Public Attributes inherited from PyXMake.Build.Make.Make
 buildid = BuildID
 Base string of build object.
 
list srcs = []
 Source file or folders.
 
list bare = not BuildID and not self.srcs
 
 stype = kwargs.get("stype",'Fortran')
 Source file type.
 
 verbose = verbose
 Level of verbosity of the current build object.
 
 hasFoss = kwargs.get("foss", Utility.GetExecutable("choco") or Utility.GetPlatform() in ["linux"] or kwargs.get("bash",False))
 Toggle between free open source software and commercial 3rd party libraries.
 
 scrtdir = os.getcwd()
 Current scratch directory

 
 srcdir = os.getcwd()
 Default search directory for source files.
 
 outdir = os.getcwd()
 Default search directory for output.
 
_, self.intelpath, self.iniCompiler intelpath = content
 Path to Intel Fortran Compiler (read from Paths.log or empty).
 
tuple temps = ()
 Tuple of data to be removed after job completion.
 
list incdirs = []
 List of include directories.
 
list libdirs = []
 List of library directories.
 
list libs = []
 List of actual libraries (by name) used during linking.
 
list copyfiles = []
 List of files to be copied to the output directory after finish.
 
str iniCompiler = ""
 Default initialization of compiler script.
 
bool setarch = True if kwargs.get('arch', None) in ['x86', 'x64'] else False
 Define the architecture for the build directly by using the keyword argument "arch".
 
 msvsc = kwargs.get("msvsc",'vs2015')
 Default version of Microsoft visual studio used by the Intel Fortran Compiler.
 
str architecture = 'x86'
 Processor architecture.
 
str postcmd = ""
 Post build command.
 
 buildname = self.temps + (inputfile, )
 
str precmd = self.iniCompiler+" "+cmdstring
 Command executed during pre-build event.
 
 compargs = cmdstring
 Command line arguments passed in by the user.
 
str makecmd = self.iniCompiler+" "+os.path.join(self.path2exe,self.exe)+" "+ cmd + cmdstring
 Command executed during build event.
 
 mkl_dependency
 
- Public Attributes inherited from PyXMake.Build.Make.NT
str SystemObjectKind = "NT"
 String identifier of current instance.
 
- Public Attributes inherited from PyXMake.Build.Make.OS
str SystemObjectKind = "Base"
 String identifier of current instance.
 
- Public Attributes inherited from PyXMake.Build.Make.POSIX
str SystemObjectKind = "POSIX"
 String identifier of current instance.
 
 scrtdir
 Overwrite create method in all subclasses to use a predefined MakeFile for all builds.
 
 temps = self.temps + ("Makefile",)
 Overwrite create method in all subclasses to use a predefined MakeFile for all builds.
 
 environ = copy.deepcopy(getattr(os.environ,"_data",{}))
 
 precmd = GetPreprocessingCommand(1).split() + self.precmd.split()[4:]; self.precmd.insert(-1,"-o")
 
str precmd = ""
 
 verbose
 
 intermediate_wrapper
 
 wrapper_module = self.scrtdir)
 
 libdirs
 
 outdir
 Accept both OutLibs and OutDir variable.
 
 outlibs = self.outmodule:
 
 outmodule = True)
 

Additional Inherited Members

- Static Public Member Functions inherited from PyXMake.Build.Make.Make
 __parser__ ()
 
 Detach ()
 
 F2CPreprocessing (PreprocessingFile)
 
 sanitize (string, **kwargs)
 
 setup (*args, **kwargs)
 
- Static Public Member Functions inherited from PyXMake.Tools.Utility.AbstractBase
 __getbase__ (base, cls)
 
- Protected Attributes inherited from PyXMake.Build.Make.Make
list _mkl_includes = [x for x in self.incdirs if "mkl" in x]
 

Detailed Description

Base class for all C/C++ build events inherited from Make.

Inherited class to build projects using Intel C/C++.


Constructor & Destructor Documentation

◆ __init__()

PyXMake.Build.Make.CCxx.__init__ ( self,
* args,
** kwargs )
Initialization of C/C++ class object.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 1332 of file Make.py.

Member Function Documentation

◆ Build()

PyXMake.Build.Make.CCxx.Build ( self,
cmdstring,
** kwargs )
Assemble command strings for the main build event.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 1389 of file Make.py.

◆ create()

PyXMake.Build.Make.CCxx.create ( self)
Execute make command

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 1496 of file Make.py.

◆ OutputPath()

PyXMake.Build.Make.CCxx.OutputPath ( self,
libpath = os.getcwd() )
Define output directories for modules and libraries. 

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 1381 of file Make.py.

◆ parse()

PyXMake.Build.Make.CCxx.parse ( cls,
** kwargs )
Execute the current class as a CLI command.

Definition at line 1423 of file Make.py.

Member Data Documentation

◆ buildname

PyXMake.Build.Make.CCxx.buildname = self.libname

Temporary build name.


Definition at line 1359 of file Make.py.

◆ compargs

PyXMake.Build.Make.CCxx.compargs = cmdstring

Used defined command line options.

Definition at line 1411 of file Make.py.

◆ exe

str PyXMake.Build.Make.CCxx.exe = "gcc"

The executable command used in the main build event.

Definition at line 1341 of file Make.py.

◆ hasFoss

PyXMake.Build.Make.CCxx.hasFoss

Definition at line 1377 of file Make.py.

◆ incremental [1/2]

PyXMake.Build.Make.CCxx.incremental = kwargs.get('incremental', False)

Define if the input should be compiled exactly as provided.

Defaults to False, meaning that merging & pre-processing utilities will be carried out.

Definition at line 1348 of file Make.py.

◆ incremental [2/2]

str PyXMake.Build.Make.CCxx.incremental = ' -c %s' % (' '.join(self.srcs))

Definition at line 1351 of file Make.py.

◆ isStatic [1/2]

bool PyXMake.Build.Make.CCxx.isStatic = True if kwargs.get('lib', 'static') not in ['shared', 'SHARED', 'Shared'] else False

Static or dynamic link library flag.

Definition at line 1344 of file Make.py.

◆ isStatic [2/2]

# pragma no cover PyXMake.Build.Make.CCxx.isStatic = 'link -dll -fixed:no -defaultlib:libcmt.lib -nodefaultlib:msvcrt.lib '

Definition at line 1402 of file Make.py.

◆ libdirs

list PyXMake.Build.Make.CCxx.libdirs = []

Blank version of list containing library directories without initially specifying MKL.


Definition at line 1371 of file Make.py.

◆ libname

PyXMake.Build.Make.CCxx.libname = self.buildid + self.architecture

Name of library, assembled using BuildID.


Definition at line 1357 of file Make.py.

◆ linkcmd

str PyXMake.Build.Make.CCxx.linkcmd = librarian +'*.obj -nologo -machine:'+self.architecture+' -out:'+os.path.join(self.outlibs,self.libname+ext)

Intel Linker command.

Definition at line 1416 of file Make.py.

◆ linkedIn

list PyXMake.Build.Make.CCxx.linkedIn = []

List of libraries which should be statically linked in.

Definition at line 1363 of file Make.py.

◆ makecmd

str PyXMake.Build.Make.CCxx.makecmd = self.iniCompiler+" "

Intel Compiler command.

Definition at line 1413 of file Make.py.

◆ MakeObjectKind

str PyXMake.Build.Make.CCxx.MakeObjectKind = 'CCxx'

String identifier of current instance.


Definition at line 1338 of file Make.py.

◆ outlibs

PyXMake.Build.Make.CCxx.outlibs = libpath

Output path for library files.

Definition at line 1386 of file Make.py.

◆ postcmd

PyXMake.Build.Make.CCxx.postcmd = '':

Definition at line 1533 of file Make.py.

◆ precmd

PyXMake.Build.Make.CCxx.precmd = '':

Definition at line 1508 of file Make.py.

◆ scrtdir

PyXMake.Build.Make.CCxx.scrtdir

Definition at line 1503 of file Make.py.

◆ temps

PyXMake.Build.Make.CCxx.temps = ()

Blank version of tuple to store temporary file names scheduled for removal.


Definition at line 1367 of file Make.py.

◆ verbose

PyXMake.Build.Make.CCxx.verbose

Definition at line 1508 of file Make.py.


The documentation for this class was generated from the following file: