cxx¶
Base for c++ programs and libraries
-
waflib.Tools.cxx.cxx_hook(self, node)[source]¶ Binds c++ file extensions to create
waflib.Tools.cxx.cxxinstances
-
class
waflib.Tools.cxx.cxx(*k, **kw)[source]¶ Bases:
waflib.Task.TaskCompiles C++ files into object files
-
vars= ['ARCH', 'ARCH_ST', 'CPPFLAGS', 'CPPPATH_ST', 'CXX', 'CXXDEPS', 'CXXFLAGS', 'CXX_SRC_F', 'CXX_TGT_F', 'DEFINES', 'DEFINES_ST', 'FRAMEWORKPATH', 'FRAMEWORKPATH_ST', 'INCPATHS']¶
-
ext_in= ['.h']¶
-
scan()¶ Get the dependencies using a c/c++ preprocessor, this is required for finding dependencies of the kind:
#include some_macro()This function is bound as a task method on
waflib.Tools.c.candwaflib.Tools.cxx.cxxfor example
-
hcode= b'${CXX} ${ARCH_ST:ARCH} ${CXXFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXX_SRC_F}${SRC} ${CXX_TGT_F}${TGT[0].abspath()} ${CPPFLAGS}'¶
-
orig_run_str= '${CXX} ${ARCH_ST:ARCH} ${CXXFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXX_SRC_F}${SRC} ${CXX_TGT_F}${TGT[0].abspath()} ${CPPFLAGS}'¶
-
-
class
waflib.Tools.cxx.cxxprogram(*k, **kw)[source]¶ Bases:
waflib.Tools.ccroot.link_taskLinks object files into c++ programs
-
vars= ['ARCH', 'ARCH_ST', 'CXXLNK_SRC_F', 'CXXLNK_TGT_F', 'FRAMEWORK', 'FRAMEWORKPATH', 'FRAMEWORKPATH_ST', 'FRAMEWORK_ST', 'LDFLAGS', 'LIB', 'LIBPATH', 'LIBPATH_ST', 'LIB_ST', 'LINKDEPS', 'LINKFLAGS', 'LINK_CXX', 'RPATH', 'RPATH_ST', 'SHLIB_MARKER', 'STLIB', 'STLIBPATH', 'STLIBPATH_ST', 'STLIB_MARKER', 'STLIB_ST']¶
-
ext_out= ['.bin']¶
-
inst_to= '${BINDIR}'¶
-
hcode= b'${LINK_CXX} ${LINKFLAGS} ${CXXLNK_SRC_F}${SRC} ${CXXLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB} ${LDFLAGS}'¶
-
orig_run_str= '${LINK_CXX} ${LINKFLAGS} ${CXXLNK_SRC_F}${SRC} ${CXXLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB} ${LDFLAGS}'¶
-
-
class
waflib.Tools.cxx.cxxshlib(*k, **kw)[source]¶ Bases:
waflib.Tools.cxx.cxxprogramLinks object files into c++ shared libraries
-
inst_to= '${LIBDIR}'¶
-
hcode= b'nocode'¶
-
-
class
waflib.Tools.cxx.cxxstlib(*k, **kw)[source]¶ Bases:
waflib.Tools.ccroot.stlink_taskLinks object files into c++ static libraries
-
hcode= b'\tdef wrap(self):\n\t\ttry:\n\t\t\tos.remove(self.outputs[0].abspath())\n\t\texcept OSError:\n\t\t\tpass\n\t\treturn old(self)\n'¶
-
-
class
waflib.Tools.cxx.link_task(*k, **kw)[source]¶ Bases:
waflib.Task.TaskBase class for all link tasks. A task generator is supposed to have at most one link task bound in the attribute link_task. See
waflib.Tools.ccroot.apply_link().-
color= 'YELLOW'¶
-
weight= 3¶ Try to process link tasks as early as possible
-
inst_to= None¶ Default installation path for the link task outputs, or None to disable
-
chmod= 493¶ Default installation mode for the link task outputs
-
add_target(target)[source]¶ Process the target attribute to add the platform-specific prefix/suffix such as .so or .exe. The settings are retrieved from
env.clsname_PATTERN
-
exec_command(*k, **kw)[source]¶ Wrapper for
waflib.Context.Context.exec_command(). This version set the current working directory (build.variant_dir), applies PATH settings (if self.env.PATH is provided), and can run long commands through a temporary@argfile.Parameters: cmd (list of string (best) or string (process will use a shell)) – process command to execute Returns: the return code Return type: int Optional parameters:
- cwd: current working directory (Node or string)
- stdout: set to None to prevent waf from capturing the process standard output
- stderr: set to None to prevent waf from capturing the process standard error
- timeout: timeout value (Python 3)
-
-
class
waflib.Tools.cxx.stlink_task(*k, **kw)[source]¶ Bases:
waflib.Tools.ccroot.link_taskBase for static link tasks, which use ar most of the time. The target is always removed before being written.
-
chmod= 420¶ Default installation mode for the static libraries
-
hcode= b'${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'¶
-
orig_run_str= '${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'¶
-
vars= ['AR', 'ARFLAGS', 'AR_SRC_F', 'AR_TGT_F']¶
-