ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
wtools.auto Namespace Reference

Functions

def node_names
 
def get_module_name
 Get fully qualified module name using the standard convention that the wscript located in a directory named after the module and intermediate packages. More...
 
def get_module_namespace_path
 Returns the current module namespace as a path element. More...
 
def auto_cunit
 Creates a cprogram task generator for the local unit test. More...
 
def auto_pyunit
 Creates a Python unit test runner task. More...
 
def auto_install_source
 Install source files to $PREFIX/sources. More...
 
def auto_cprogram
 Declare C/C++ program (.c and .cpp files) More...
 
def auto_cprotobuf
 Declare C/C++ protobuffer files generation (.proto file to pb.h/.pb.cc) and create a dynamic library. More...
 
def auto_crtidds
 Declare C/C++ RTI DDS files generation (.idl file to .h/.cxx) and create a dynamic library. More...
 
def auto_cstlib
 Declare C/C++ static library. More...
 
def auto_cobjects
 Declare C/C++ objects (collection of source and/or header files). More...
 
def auto_cshlib
 Declare C/C++ shared library. More...
 
def auto_qt5cshlib
 Declare C/C++ shared library and unit test using Qt5 (.c and .cpp files) More...
 
def auto_qt5cprogram
 Declare C/C++ program and unit test using Qt5 (.c and .cpp files) More...
 
def auto_pypackage
 Declare a Python package and unit tests. More...
 
def auto_pyprogram
 Declare a Python program, optional package and unit tests. More...
 
def auto_jar
 Declare Java JAR taskgenerator. More...
 
def auto_javatest
 Declare Java TestNG test taskgenerator. More...
 
def auto_config
 Declare configuration tasks that copies config/** (backwards compatibility) and resource/**. More...
 
def ext_sys_clib
 Declare external system C/C++ library. More...
 
def ext_proj_clib
 Declare external project C/C++ library. More...
 

Variables

list STD_EXCL = ['**/*~', '**/.*']
 

Function Documentation

def wtools.auto.auto_cobjects (   bld,
  target,
  kw 
)

Declare C/C++ objects (collection of source and/or header files).

The following preprocessor definitions are automatically added:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name

Parameters
targetName of target
Returns
Primary artefact taskgen
def wtools.auto.auto_config (   bld)

Declare configuration tasks that copies config/** (backwards compatibility) and resource/**.

def wtools.auto.auto_cprogram (   bld,
  target,
  kw 
)

Declare C/C++ program (.c and .cpp files)

The following preprocessor definitions are automatically added:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name

Parameters
targetName of target
Returns
Primary artefact taskgen
def wtools.auto.auto_cprotobuf (   bld,
  target,
  kw 
)

Declare C/C++ protobuffer files generation (.proto file to pb.h/.pb.cc) and create a dynamic library.

If a static library is preferred an option "features=cxxstlib" can be passed

Parameters
targetName of target
def wtools.auto.auto_crtidds (   bld,
  target,
  kw 
)

Declare C/C++ RTI DDS files generation (.idl file to .h/.cxx) and create a dynamic library.

If a static library is preferred an option "features=cxxstlib" can be passed

Make sure that the project is configured (use) with 'rtidds' (and rtiddsgen tool is in the $PATH).

Parameters
targetName of target
def wtools.auto.auto_cshlib (   bld,
  target,
  kw 
)

Declare C/C++ shared library.

The following preprocessor definitions are automatically added:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name

Parameters
targetName of target
Returns
Primary artefact taskgen
def wtools.auto.auto_cstlib (   bld,
  target,
  kw 
)

Declare C/C++ static library.

The following preprocessor definitions are automatically added:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name

Parameters
targetName of target
Returns
Primary artefact taskgen
def wtools.auto.auto_cunit (   bld,
  target,
  test_tg = None,
  kw 
)

Creates a cprogram task generator for the local unit test.

The following preprocessor definisions are defined by default:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name UNIT_TEST=1

Parameters
targetbasename for unit test ('_test' will be appended).
test_tg(optiona) The task generator for the software under test. Sources will be copied from this task generator.
source(optional) list of test source files defaults to test/**/*.cpp.
extra_source(optional) list of additional source files, used to e.g. build also primary artefact sources. The file src/main.{cpp,c} will be removed if it exists to not introduce another main() in the test artefact.
def wtools.auto.auto_install_source (   bld,
  kw 
)

Install source files to $PREFIX/sources.

Parameters
sourcelist of source files. Globs everything in src/**/* by default.
def wtools.auto.auto_jar (   bld,
  k,
  kw 
)

Declare Java JAR taskgenerator.

Compiles all the .java files in src and generated relative .class files that are then packed in the JAR from the build directory.

Files present in src/resources are recursively included in the JAR along with all the generated .class files.

JAR files generated are installed in ${PREFIX}/lib

Parameters
target(Mandatory) Name of task generator and generated JAR file
manifest(Optional) Manifest file to be used (path relative from module)
def wtools.auto.auto_javatest (   bld,
  k,
  kw 
)

Declare Java TestNG test taskgenerator.

Test configuration is read from TestNG XML configuration files that are searched recursively under test/ for files that finish in testng.xml

Files present in test/resources are recursively copied to the build along with all the generated .class files and can be therefore used by the test.

If coverage is enabled the tests will be run through jacoco and at the end jacococli will be executed to generate the HTML reports from the jacoco binary data.

def wtools.auto.auto_pypackage (   bld,
  target,
  kw 
)

Declare a Python package and unit tests.

def wtools.auto.auto_pyprogram (   bld,
  target,
  kw 
)

Declare a Python program, optional package and unit tests.

It assumes that there will be:

  • A single src/<target>.py file representing the program executable. The script will be installed without the .py extension
  • An optional src/<target>/ Python package for bigger programs needing multiple files without having to create additional modules.

The unit tests will have the PYTHONPATH populated such that the pyprogram module Python package can be imported in the tests.

Parameters
target(Mandatory) Name of task generator (must match target filename)
def wtools.auto.auto_pyunit (   bld,
  target,
  kw 
)

Creates a Python unit test runner task.

It executes nosetests on all sources in src/ test/ from in the build dir test directory.

The PYTHONPATH is populated so that dependent Python modules and packages from use list are found before any installed version.

def wtools.auto.auto_qt5cprogram (   bld,
  target,
  kw 
)

Declare C/C++ program and unit test using Qt5 (.c and .cpp files)

The following preprocessor definitions are automatically added:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name

def wtools.auto.auto_qt5cshlib (   bld,
  target,
  kw 
)

Declare C/C++ shared library and unit test using Qt5 (.c and .cpp files)

The following preprocessor definitions are automatically added:

WAF_MODULE_PATH = absolute path to the module root WAF_MODULE_NAME = fully qualified module name

def wtools.auto.ext_proj_clib (   cnf,
  name,
  libs = None,
  prefix = None 
)

Declare external project C/C++ library.

Parameters
nameCanonical library name. I.e. 'mod' for library 'libmod.so'/'libmod.a'
prefixThe prefix is automatically picked up from
def wtools.auto.ext_sys_clib (   cnf,
  name,
  libs,
  libpath,
  incpath 
)

Declare external system C/C++ library.

def wtools.auto.get_module_name (   ctx,
  submodule = None 
)

Get fully qualified module name using the standard convention that the wscript located in a directory named after the module and intermediate packages.

def wtools.auto.get_module_namespace_path (   ctx)

Returns the current module namespace as a path element.

Examples

1 "module" if module is in the global module namespace or,
2 "package1/package2/module" if the module is ordered inside package.
def wtools.auto.node_names (   nodes)

Variable Documentation

list wtools.auto.STD_EXCL = ['**/*~', '**/.*']