Skip to content

sage8312/Magic

Repository files navigation

Magic

Automagically working C++ Coroutine: Documentation

Build status Build Status Build Status

SonarQube: Quality SonarQube: Coverage SonarQube: Bugs SonarQube: Code Smells

How To

Build

For detailed build steps, reference .travis.yml and appveyor.yml.

Windows: Visual Studio 2017(vc141)

  • compiler option: /await
  • compiler option: /std:c++latest

Build Magic.sln for Visual Studio environment. CMakeLists.txt doesn't support this case. Add reference to the project that you need.

Windows: Clang 6

Follow this script. Clang + Windows uses Ninja build system and CMake for project generation. It requires Chocolaty and the following packages.

Linux: Clang 5

The build step follows Building libc++. .travis.yml

MacOS: AppleClang

Trigger manual LLVM update before build. Minimum version is stable 6.0.0. If you are using brew, the following command will be enough.

brew upgrade llvm;

Test

You can use cppmagic_vstest.dll for Visual Studio Native Test. For the other case, you can use cppmagic_test. Android or iPhone OS doesn't support test for now.

cd path/to/cppmagic;  # Case of MacOS

mkdir -p build; pushd build;
  cmake ../ -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install;
  ninja;

  ./cppmagic_test; # After build, you can run the test program
popd;

Use

For CMake based project, use add_subdirectory. But notice that it doesn't support windows.

if(NOT TARGET cppmagic) # project name: `cppmagic`
    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cppmagic)
endif()

Package

Not in plan for now

Nuget package for Visual Studio users.

License

Feel free for any kind of usage.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

About

Auto-magically working C++ coroutines

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages