Construct a new instance. The instance isn't ready, and must be initalized.
The extension context
This is private. You must call create
to get an instance.
The object in charge of talking to CMake. It starts empty (null) because we don't know what driver to use at the current time. The driver also has two-phase init and a private constructor. The driver may be replaced at any time by the user making changes to the workspace configuration.
The compilation database for this driver.
A strand to serialize operations with the CMake driver
The variant manager keeps track of build variants. Has two-phase init.
The extension context
This is private. You must call create
to get an instance.
Get the name of the "all" target; that is, the target name for which CMake will build all default targets.
This is required because simply using all
as the target name is incorrect
for some generators, such as Visual Studio and Xcode.
This is async because it depends on checking the active generator name
The current build type
Event fired when the code model from CMake is updated
Whether CTest is enabled
The target that will be built with a regular build invocation
Whether the backend is busy running some task
The "launch target" (the target that will be run by debugging)
Event fired after CMake configure runs
The status of this backend
The current target to build.
The current CTest results
Wraps pre/post configure logic around an actual configure function
The actual configure callback. Called to do the configure
Second phase of two-phase init. Called by create
.
Check if the current project needs to be (re)configured
Start up a new CMake driver and return it. This is so that the initialization of the driver is atomic to those using it
Dispose of the extension asynchronously.
Implementation of cmake.build
Implementaiton of cmake.clean
Implementation of `cmake.cleanConfigure()
Implementation of cmake.cleanRebuild
Implementation of cmake.configure
Implementation of cmake.debugTarget
Dispose the extension
Returns, if possible a cmake driver instance. To creation the driver instance, there are preconditions that should be fulfilled, such as an active kit is selected. These preconditions are checked before it driver instance creation. When creating a driver instance, this function waits until the driver is ready before returning. This ensures that user commands can always be executed, because error criterials like exceptions would assign a null driver and it is possible to create a new driver instance later again.
Implementation of cmake.install
Implementation of cmake.launchTarget
Implementation of cmake.launchTargetPath
Save all open files. "maybe" because the user may have disabled auto-saving
with config.saveBeforeBuild
.
Implementation of cmake.quickStart
Implementation of cmake.resetState
Implementation of cmake.selectLaunchTarget
Set the default target to build. Implementation of cmake.setDefaultTarget
If specified, set this target instead of asking the user
Used by vscode and as test interface
Implementation of cmake.setVariant
Implementation of cmake.stop
Attempt to execute the compile command associated with the file. If it
fails for any reason, returns null
. Otherwise returns the terminal in
which the compilation is running
The path to a file to try and compile
Implementation of cmake.viewLog
Create an instance asynchronously
The extension context
The purpose of making this the only way to create an instance is to prevent us from creating uninitialized instances of the CMake Tools extension.
Create a new CMakeTools for the given directory.
Path to the directory for which to create
The extension context
Generated using TypeDoc
Class implementing the extension. It's all here!
The class internally uses a two-phase initialization, since proper startup requires asynchrony. To ensure proper initialization. The class must be created via the
create
static method. This will run the two phases internally and return a promise to the new instance. This ensures that the class invariants are maintained at all times.Some fields also require two-phase init. Their first phase is in the first phase of the CMakeTools init, ie. the constructor.
The second phases of fields will be called by the second phase of the parent class. See the
_init
private method for this initialization.