fplutil
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
fplutil.buildutil.linux.BuildEnvironment Class Reference

Class representing a Linux build environment. More...

Inheritance diagram for fplutil.buildutil.linux.BuildEnvironment:
fplutil.buildutil.common.BuildEnvironment

Public Member Functions

def run_cmake
 Run cmake based on the specified build environment. More...
 
- Public Member Functions inherited from fplutil.buildutil.common.BuildEnvironment
def run_subprocess
 Run a subprocess as specified by the given argument list. More...
 
def run_make
 Run make based on the specified build environment. More...
 
def make_archive
 Archive build artifacts at the specified directory paths. More...
 
def git_clean
 Cleans build directory back to last git commit. More...
 
def get_project_directory
 Retrieve an absolute path relative to the project_directory. More...
 

Static Public Member Functions

def build_defaults
 Helper function to set build defaults. More...
 
def add_arguments
 Add module-specific command line arguments to an argparse parser. More...
 
- Static Public Member Functions inherited from fplutil.buildutil.common.BuildEnvironment
def build_defaults
 Helper function to set build defaults. More...
 
def add_arguments
 Add module-specific command line arguments to an argparse parser. More...
 

Public Attributes

 cmake_path
 Path to the cmake binary, for cmake-based projects. More...
 
 cmake_flags
 Flags to pass to cmake, for cmake-based projects. More...
 
- Public Attributes inherited from fplutil.buildutil.common.BuildEnvironment
 project_directory
 The top-level project directory to build. More...
 
 output_directory
 The top level directory to copy the build archive to. More...
 
 enable_git_clean
 Boolean value to enable cleaning for git-based projects. More...
 
 make_path
 Path to the make binary, for make-based projects. More...
 
 git_path
 Path to the git binary, for projects based on git. More...
 
 make_flags
 Flags to pass to make, for make-based projects. More...
 
 cpu_count
 Number of CPU cores to use while building. More...
 
 verbose
 Boolean to enable verbose message output. More...
 
 clean
 Boolean value which specifies whether to clean the project. More...
 
 host_os_name
 Lowercased name of host operating system. More...
 
 host_architecture
 Lowercased name of host machine architecture. More...
 

Static Public Attributes

string CMAKE = 'cmake'
 
- Static Public Attributes inherited from fplutil.buildutil.common.BuildEnvironment
string GIT = 'git'
 
string MAKE = 'make'
 

Detailed Description

Class representing a Linux build environment.

This class adds Linux-specific functionality to the common BuildEnvironment.

Member Function Documentation

def fplutil.buildutil.linux.BuildEnvironment.add_arguments (   parser)
static

Add module-specific command line arguments to an argparse parser.

This will take an argument parser and add arguments appropriate for this module. It will also set appropriate default values.

Parameters
parserThe argparse.ArgumentParser instance to use.
def fplutil.buildutil.linux.BuildEnvironment.build_defaults ( )
static

Helper function to set build defaults.

Returns
A dict containing appropriate defaults for a build.
def fplutil.buildutil.linux.BuildEnvironment.run_cmake (   self,
  gen = 'Unix Makefiles' 
)

Run cmake based on the specified build environment.

This will execute cmake using the configured environment, passing it the flags specified in the cmake_flags property.

Parameters
genOptional argument to specify CMake project generator (defaults to Unix Makefiles)
Exceptions
SubCommandErrorCMake invocation failed or returned an error.
ToolPathErrorCMake not found in configured build environment or $PATH.

Member Data Documentation

fplutil.buildutil.linux.BuildEnvironment.cmake_flags

Flags to pass to cmake, for cmake-based projects.

fplutil.buildutil.linux.BuildEnvironment.cmake_path

Path to the cmake binary, for cmake-based projects.


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