Artificial life simulation using CUDA for compute. The guide below explains how to set up the project, the necessary dependencies, and how to create both Debug and Release builds.
Clone the repository:
git clone https://github.com/jonahshader/alife_cuda.git
cd alife_cuda
Ensure CUDA and CMake are installed and properly set up. TODO: more details.
Create a build directory for the debug configuration:
mkdir build-debug
cd build-debug
Configure the project with CMAKE_BUILD_TYPE=Debug
:
cmake -DCMAKE_BUILD_TYPE=Debug ..
Build the project:
cmake --build .
Create a build directory for the release configuration:
mkdir build-release
cd build-release
Configure the project with CMAKE_BUILD_TYPE=Release
:
cmake -DCMAKE_BUILD_TYPE=Release ..
Build the project:
cmake --build .
For Windows users, it's recommended to use the Visual Studio Developer Command Prompt to ensure the MSVC compiler is used.
Open the Visual Studio Developer Command Prompt.
Create separate directories for Debug and Release builds:
mkdir build-debug
cd build-debug
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
nmake
mkdir build-release
cd build-release
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
nmake
Alternatively, you can generate Visual Studio project files using: TODO: verify. I thought a newer version of Visual Studio was needed.
cmake -G "Visual Studio 16 2019" -A x64 ..
Then open the generated .sln
file in Visual Studio, select the configuration (Debug/Release), and build.
CMake Options:
CMAKE_BUILD_TYPE=Debug
: Enables debugging information and disables optimizations.CMAKE_BUILD_TYPE=Release
: Optimizes the code and strips debug information.CUDA Version: Make sure that your CUDA version is compatible with your compiler. You can check the CUDA compatibility guide for more information.
Add license details here.