HOW TO COMPILE, BUILD AND RUN THE PROJECT:
If this is the C++/CUDA template, please copy the entire folder, rename it, and continue.
Note: - Update any mention of "project" in the CMakeLists.txt file - If the template project has a "build" folder, delete it before building. - Also copy the .vscode folder between projects.
Organization: - /src: main c++ files - /include: header files, both c++ and cu declarations - /kernels: all GPU code files
--- | Manual Way
- Open VS Code
- Click the dropdown arrow by the terminal, select "Command Prompt"
- Type "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" into cmd
- To compile code "cl main.cpp" to run it "main.exe"
--- | CMake Way
- Ensure the CMakeLists.txt is properly updated with a new project name
- Type "cmake -S . -B build" into PS to configure the project
- Type "cmake --build build" into PS to build the project
- Type ".\build\Debug\project.exe" to run the project, make sure to change "project" to match txt
--- | Powershell Function (Simplest)
- Type ".\run.ps1" in the terminal and it should accomplish everything from CMake