|
cross-platform-generator
|
Utility class for running cmake using the cmake CLI. More...
Public Types | |
| enum | Generators { Generators.VS2005, Generators.VS2008, Generators.VS2010, Generators.VS2012, Generators.VS2013, Generators.VS2015, Generators.VS2017 } |
| The different type of generators supported by cmake. More... | |
| enum | Platforms { Platforms.Win32 } |
| The different kind of supported platforms. More... | |
Public Member Functions | |
| void | RedirectOutput (Action< string, int > callback) |
| Redirects the standard output to a custom callback. More... | |
| void | SetSourceDirectory (string path) |
| Sets the location to search for source files. More... | |
| void | SetOutputDirectory (string path) |
| Sets the directory to put the generated files in. More... | |
| void | SetGenerator (Generators generator) |
| Sets what generator to use. More... | |
| CMake (ref ObservableCollection< Variable > variables, ObservableCollection< PostGenerateStep > post_generate_steps) | |
| Constructor: finds the cmake process and initializes the variables and post generate steps. More... | |
| void | Generate () |
| Runs cmake. this calls set arguments before running cmake and all arguments from a previous call are cleared. More... | |
| void | SetPlatform (Platforms platform) |
| Sets the platform to generate the project for. More... | |
Private Member Functions | |
| void | OnOutputDataRecieved (object sender, DataReceivedEventArgs e) |
| calls the callback passed with the RedirectOutput function. More... | |
| string | GetCMakeArgs () |
| sets the arguments to be used when the processed is started. The arguments passed are read from the variable list passed with the contructor. More... | |
| void | Log (string text, int verbosity=kVerbosity) |
| writes a message using the set output callback More... | |
| void | Process__Exited (object sender, EventArgs e) |
| Callback for when generation is done. More... | |
Private Attributes | |
| const int | kVerbosity = 0 |
| The verbosity used to log all messages. | |
| Process | process_ |
| Cmake process used to run cmake commands. | |
| Action< string, int > | output_callback_ |
| Callback used to replace the standard output stream. | |
| readonly ObservableCollection< Variable > | variables_ |
| Variables to run cmake with. | |
| readonly ObservableCollection< PostGenerateStep > | post_generate_steps_ |
| The commands to run after generation was succesfull. | |
| string | source_directory_ |
| The directory used to search for source files. | |
| string | output_directory_ |
| The directory to put the generated files in. | |
| Generators | generator_ |
| The cmake generot used to generate the project. | |
| List< string > | default_arguments_ |
| Default arguments that are always used when projects are generated. | |
| Platforms | platform_ |
| The platform to generate the project for. | |
| string | cmake_path_ |
| The install path of cmake. | |
Utility class for running cmake using the cmake CLI.
|
strong |
The different type of generators supported by cmake.
|
strong |
|
inline |
Constructor: finds the cmake process and initializes the variables and post generate steps.
| [in] | variables | (ref ObservableCollection<Variables>) Refrence to a list of variabels to be used when generating a project |
| [in] | post_generate_steps | (ObservableCollection<PostGenerateStep>) Refrence to the list of steps to execute after generating a project. |
|
inline |
Runs cmake. this calls set arguments before running cmake and all arguments from a previous call are cleared.
|
inlineprivate |
sets the arguments to be used when the processed is started. The arguments passed are read from the variable list passed with the contructor.
|
inlineprivate |
writes a message using the set output callback
| [in] | text | (string) The message to write. |
| [in] | verbosity | (int) The vervosity used to write the message |
|
inlineprivate |
calls the callback passed with the RedirectOutput function.
| [in] | sender | (object) The sender of the event. |
| [in] | e | (DataReceivedEventArgs) The parameters containing data of the event. |
|
inlineprivate |
Callback for when generation is done.
| [in] | sender | (object) The sender of the event. |
| [in] | e | (EventArgs) Arguments send with the event. |
|
inline |
Redirects the standard output to a custom callback.
| [in] | callback | (Action<string>) Callback used to process the output. |
|
inline |
Sets what generator to use.
| [in] | generator | (cpg.CMake.Generators) The new generator to use. |
|
inline |
Sets the directory to put the generated files in.
| [in] | path | (string) absolute path to a location on disk |
|
inline |
Sets the platform to generate the project for.
| [in] | platform | (cpg.CMake.Platforms) The new platform the generate projects for. |
|
inline |
Sets the location to search for source files.
| [in] | path | (string) absolute path to a location on disk. |
1.8.14