emu is a library that gather a set of utilities for C++, CUDA and python.
emu requires a c++20 compiler and the following tools:
- cmake >= 3.24
- cuda >= 12.1 (the one with device cuda graph feature)
- conan >= 2.0.0 or vcpkg (experimental)
- just optional
emu requires cmake and conan to install dependencies and build.
Also, we recommend to use just to simplify the build process.
Note:
conanrequires some configuration to work properly. See our guide or simply run:
curl -sS https://raw.githubusercontent.com/raplonu/cosmic-center-index/refs/heads/main/install.sh | bashFor CMake regulars, you can use the following commands to build the project:
# install dependencies
conan install . -b missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config"
# configure the project
cmake --preset conan-default
# build the project
cmake --build --preset releaseNote: The
emuCMake presets are designed to be use with the Ninja Multi-Config generator (though it's not required). To enable it, set the environment variable:CMAKE_GENERATOR="Ninja Multi-Config"and addtools.cmake.cmaketoolchain:generator = Ninja Multi-Configin conan.
Note:
missingis used to build dependencies from source if binary is not available.editableis used to build local dependencies register usingconan editable addcommand.
conan offers an alternative way to build the project using conan build command. This command will configure and build the project in a single step.
conan build . -b missingOr use just dev.
After building the project, you can use conan editable add command to add the project as an editable package. This will allow you to modify the source code and rebuild the project without having to reinstall it.
conan editable add .For incremental build, just run:
cmake --build --preset releaseor use just build.
To use project in debug mode use conan create|build|install [...] -s build_type=Debug commands and cmake --build --preset debug commands.
