This PowerShell script is designed to automate the process of setting up a C++ project. It provides a simple interface for creating a new project, building it, and running it. The script can also be used to compile a single source file.
To use the script, you need to have the following installed:
- PowerShell
- CMake version 3.30.4 or later
- Clone the repository to your local machine.
- Open PowerShell and navigate to the directory where you cloned the repository.
- Run the following command:
.\voidcpp.ps1
Note: for permanent usage, you can add the script to your
$PROFILE
file.
- Open PowerShell and navigate to the directory where you want to create the project.
- Run the following command:
vcpp init <project_name>
Replace <project_name>
with the desired name for your project. This will create a new directory with the specified name and set up the basic structure for your project.
Note: if you don't specify a project name, the script will initialize in the current directory and use its name as the project name.
Run the following command in the project directory:
vcpp build <configuration>
Replace <configuration>
with either Debug
or Release
. This will build the project using the specified configuration.
Run the following command:
vcpp run
The script will run the executable with the most recently modified file in the Binaries
directory.
vcpp make <filename>
Replace <filename>
with the name of the source file you want to compile.
Contributions are welcome! If you have any suggestions or improvements, please open an issue or submit a pull request.