Giter Club home page Giter Club logo

mirror-1's Introduction

Mirror reflection utilities

Author:Matúš Chochlík <[email protected]>

Reboot of the Mirror reflection utilities implemented on top of the C++ reflection TS.

Cloning the Mirror repository

git clone --recursive https://github.com/matus-chochlik/mirror.git

Building clang with reflection support

Install the required packages for building clang:

apt install cmake clang lld ninja-build libgmp-dev libmpfr-dev

Build and install clang and libc++:

cd /path/to/mirror/src/dir && \
./tools/build_llvm.sh \
   -b /path/to/llvm/build/dir \
   -i /path/to/llvm/install/dir

Setting up the toolchain

In order for the build system of the Mirror library to use clang built and installed in the previous step either copy the default toolchain file:

cd /path/to/mirror/src/dir && \
cp toolchain.cmake.bak toolchain.cmake

or create your own cmake toolchain file which needs at least to set the following variables:

set(MIRROR_LLVM_PREFIX /path/to/installed/llvm)
set(CMAKE_CXX_COMPILER ${MIRROR_LLVM_PREFIX}/bin/clang++)

Building Mirror

In order to build the Mirror library and its examples with the appropriate toolchain you can do:

mkdir -p /path/to/mirror/build/dir && \
cd /path/to/mirror/build/dir && \
cmake \
  -DCMAKE_TOOLCHAIN_FILE=/path/to/mirror/toolchain.cmake \
  /path/to/mirror/src/dir && \
make -j N

or

mkdir -p /path/to/mirror/build/dir && \
cd /path/to/mirror/build/dir && \
cmake \
  -G Ninja \
  -DCMAKE_TOOLCHAIN_FILE=/path/to/mirror/toolchain.cmake \
  /path/to/mirror/src/dir && \
ninja

License

Copyright 2008-2021 Matus Chochlik. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

The applications using Qt5 are distributed under the GNU GENERAL PUBLIC LICENSE version 3. See http://www.gnu.org/licenses/gpl-3.0.txt

mirror-1's People

Contributors

kris-jusiak avatar matus-chochlik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.