2
0

inherit.md 721 B

inherit

  • Import and inherit base class modules

Function Prototype

::: tip API

inherit(modulename: <string>)

:::

Parameter Description

Parameter Description
modulename Module name string

Usage

This is equivalent to the inherit mode of the import interface, which is:

import("xxx.xxx", {inherit = true})

With the inherit interface, it will be more concise:

Inherit("xxx.xxx")

For an example, see the script in the xmake tools directory: clang.lua

This is part of the clang tool module that inherits gcc.