Builds CMake configurations.

new Cmaker()
.setMinimumVersion("3.0.2") // Could have a standard minimum version
.addSources(Io.getPaths(srcFolder, "*.cpp"))
.addCxxFlags("-O3", "-std=c++11")
.addLibs("stdc++")
.addIncludes(srcFolder);
.setVariable(name, value)
cmaker.getCMake()
cmaker.build(Io.getPath(srcFolder, "build"));

Hierarchy (view full)

Constructors

Properties

cFlags: string[] = []
compiler: undefined | cMakeCompiler = undefined
customCMakeCode: undefined | string = undefined
cxxFlags: string[] = []
disableWeaving: boolean
generator: undefined | string = undefined
includeFolders: Set<string> = ...
lastMakeOutput: undefined | processExecutor = undefined
libs: string[] = []
makeCommand: string = "make"
minimumVersion: string = CMaker.MINIMUM_VERSION
printToConsole: boolean = false
sources: cMakerSources
toolName: string

Methods

  • Builds the program currently defined in the CMaker object.

    Parameters

    • cmakelistsFolder: string | File = ...

      The folder where the CMakeList files will be written

    • builderFolder: string | File = ...

      The folder where the program will be built

    • OptionalcmakeFlags: string

      Additional flags that will be passed to CMake execution

    Returns undefined | File

    File to the executable compiled by the build.