Skip to content

Latest commit

 

History

History

template

Template

C++ project template for the Ace toolchain with modules support.

CMake

Configure project.

# Linux
cmake --preset linux

# Linux & Windows
cmake --preset mingw

Build target.

# cmake --build build/<preset> --config <config> --target <target1> [target2]...
# Linux
cmake --build build/linux --config Debug --target main tests
cmake --build build/linux --config Release --target main tests benchmarks
cmake --build build/linux --config RelWithDebInfo --target main tests
cmake --build build/linux --config MinSizeRel --target main tests benchmarks
cmake --build build/linux --config Coverage --target tests

# Linux & Windows
cmake --build build/mingw --config Debug --target main tests
cmake --build build/mingw --config Release --target main tests benchmarks
cmake --build build/mingw --config RelWithDebInfo --target main tests
cmake --build build/mingw --config MinSizeRel --target main tests benchmarks
cmake --build build/mingw --config Coverage --target tests

Run application.

# Linux
build/linux/Debug/ace

# Linux Emulator
WINEDEBUG=-all \
WINEPATH=${ACE}/sys/mingw/bin \
wine build/mingw/Debug/ace.exe

# Windows
build\mingw\Debug\ace.exe

Run benchmarks.

# Linux
build/linux/Release/benchmarks

# Linux Emulator
WINEDEBUG=-all \
wine build/mingw/Release/benchmarks.exe

# Windows
build\mingw\Release\benchmarks.exe

Run tests.

# Linux
ctest --test-dir build/linux -C Debug

# Linux & Windows
ctest --test-dir build/mingw -C Debug

Analyze Code Coverage.

# Linux
ctest --test-dir build/linux -C Coverage
${ACE}/bin/llvm-profdata merge -sparse build/linux/default.profraw -o build/linux/default.profdata
${ACE}/bin/llvm-cov show build/linux/Coverage/tests -instr-profile=build/linux/default.profdata

# Linux Emulator
ctest --test-dir build/mingw -C Coverage
${ACE}/bin/llvm-profdata merge -sparse build/mingw/default.profraw -o build/mingw/default.profdata
${ACE}/bin/llvm-cov show build/mingw/Coverage/tests.exe -instr-profile=build/mingw/default.profdata

# Windows
ctest --test-dir build/mingw -C Coverage
%ACE%\bin\llvm-profdata.exe merge -sparse build/mingw/default.profraw -o build/mingw/default.profdata
%ACE%\bin\llvm-cov.exe show build/mingw/Coverage/tests.exe -instr-profile=build/mingw/default.profdata

Create package.

# Linux
cmake --build build/linux --config Release --target package

# Windows
cmake --build build/mingw --config Release --target package

Editor

  1. Configure editor according to doc/editor.md.
  2. Open project directory in editor.

Template

Modify the project template.

  1. Update this readme file.
  2. Update project in CMakeLists.txt.
  3. Update Project Headers in .clang-format.
  4. Update sources and icon in src.
  5. Rename src/ace to project namespace.
  6. Add project and dependency licenses to resource files: