cling/README.md

87 lines
3.1 KiB
Markdown
Raw Normal View History

2014-03-04 15:23:17 +01:00
_ _ _ _ _ _ _ _ _ _ _ _
_ (_)(_)(_) _ (_) (_)(_)(_) (_) _ (_) _ (_)(_)(_) _
(_) (_) (_) (_) (_)(_)_ (_) (_) (_)
(_) (_) (_) (_) (_)_ (_) (_) _ _ _
(_) (_) (_) (_) (_)_ (_) (_) (_)(_)(_)
(_) _ (_) (_) (_) (_)(_) (_) (_)
(_) _ _ _ (_) (_) _ _ _ (_) _ (_) (_) (_) _ _ _ (_)
(_)(_)(_) (_)(_)(_) (_)(_)(_) (_) (_) (_)(_)(_)(_)
--------------------------------------------------------------------------------
##DESCRIPTION
Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure. Cling realizes the read-print-evaluate-loop concept, in order to leverage rapid application development. Implemented as a small extension to LLVM and Clang, the interpreter reuses their strengths such as the praised concise and expressive compiler diagnostics.
### Further information & demos
Please note that some of the resources are rather old and most of the stated limitations are outdated.
* https://github.com/vgvassilev/cling/tree/master/www/docs/talks
* http://blog.coldflake.com/posts/2012-08-09-On-the-fly-C++.html
* http://solarianprogrammer.com/2012/08/14/cling-cpp-11-interpreter/
* https://www.youtube.com/watch?v=f9Xfh8pv3Fs
* https://www.youtube.com/watch?v=BrjV1ZgYbbA
* https://www.youtube.com/watch?v=wZZdDhf2wDw
* https://www.youtube.com/watch?v=eoIuqLNvzFs
2014-03-04 15:23:17 +01:00
##INSTALLATION
###Binaries
We offer binary snapshots for download at https://ecsft.cern.ch/dist/cling
2014-03-04 15:23:17 +01:00
###Source
CLING source depends on the LLVM[1] and CLANG[2] headers and libraries.
2014-02-21 10:30:12 +01:00
You will also need CMake[3] >= 2.6.1 or GNU Make to build all of those
packages and subversion[4] and git[5] to get the source code.
2014-03-04 15:23:17 +01:00
[1] http://llvm.org
[2] http://clang.llvm.org
[3] http://cmake.org
[4] http://subversion.tigris.org
2014-02-21 10:30:12 +01:00
[5] http://git-scm.com
2014-03-04 15:23:17 +01:00
####Building
Building LLVM and CLANG you must:
* Check out the sources:
```bash
git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/cling.git
git clone http://root.cern.ch/git/clang.git
cd clang
git checkout cling-patches
```
* Configure, build and install them, either using CMake:
```bash
cd ..
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/some/install/dir \
-DLLVM_TARGETS_TO_BUILD=CBackend\;CppBackend\;X86 \
-DCMAKE_BUILD_TYPE=Debug \
../src
make
make install
```
* or GNU Make (see ../src/configure --help for all options):
2014-03-04 15:23:17 +01:00
```bash
cd ..
mkdir build
cd build
../src/configure --prefix=/some/install/dir
make
make install
```
2014-03-04 15:23:17 +01:00
##USAGE
To get started run: `/some/install/dir/bin/cling --help`
2014-02-21 10:35:50 +01:00
or type
2014-03-04 15:23:17 +01:00
`/some/install/dir/bin/cling`
`[cling]$ .help`
##DEVELOPERS' CORNER:
2014-02-21 10:30:12 +01:00
We have doxygen documentation of cling's code at:
http://cling.web.cern.ch/cling/doxygen/