2013-09-13 17:01:40 +00:00
|
|
|
Preparing working environment on Ubuntu 12.04
|
|
|
|
---------------------------------------------
|
|
|
|
|
|
|
|
### Install basic packages
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
sudo apt-get install git
|
|
|
|
sudo apt-get install libgmp-dev
|
|
|
|
sudo apt-get install libmpfr-dev
|
2013-09-19 18:49:04 +00:00
|
|
|
sudo add-apt-repository ppa:kalakris/cmake -y
|
2013-09-15 04:18:05 +00:00
|
|
|
sudo apt-get install cmake
|
2013-11-08 18:43:52 +00:00
|
|
|
sudo apt-get install liblua5.2.0 lua5.2-0 lua5.2-dev
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
|
|
|
sudo update-alternatives --remove-all gcc
|
|
|
|
sudo update-alternatives --remove-all g++
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install g++-4.8 -y
|
|
|
|
sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
|
2013-09-13 17:01:40 +00:00
|
|
|
|
|
|
|
### Optional packages
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
sudo apt-get install gitg
|
|
|
|
sudo apt-get install valgrind
|
|
|
|
sudo apt-get install doxygen
|
|
|
|
sudo apt-get install kcachegrind
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2013-12-10 01:45:31 +00:00
|
|
|
sudo add-apt-repository --yes ppa:boost-latest/ppa
|
|
|
|
sudo apt-get install libboost1.54-dev
|
|
|
|
sudo apt-get install libboost-thread1.54-dev
|
|
|
|
|
2014-04-29 22:31:29 +00:00
|
|
|
### Fork Lean on github : https://github.com/leanprover/lean
|
2013-09-13 17:01:40 +00:00
|
|
|
|
|
|
|
### Create a projects directory
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
cd ~
|
|
|
|
mkdir projects
|
|
|
|
cd projects
|
2013-09-13 17:01:40 +00:00
|
|
|
|
|
|
|
### Clone your fork
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
git clone https://github.com/[your-user-name]/lean.git
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2017-01-17 19:32:27 +00:00
|
|
|
### Build Lean in release mode
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
cd lean
|
|
|
|
mkdir -p build/debug
|
|
|
|
cd build/debug
|
2017-01-17 19:32:27 +00:00
|
|
|
cmake -D CMAKE_BUILD_TYPE=Release ../../src
|
2013-09-15 04:18:05 +00:00
|
|
|
make
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2017-01-17 19:32:27 +00:00
|
|
|
### Alternatively, build Lean using Boost
|
2013-12-10 01:45:31 +00:00
|
|
|
|
|
|
|
cd lean
|
|
|
|
mkdir -p build/release
|
|
|
|
cd build/release
|
|
|
|
cmake -D CMAKE_BUILD_TYPE=Release -D BOOST=ON ../../src
|
|
|
|
make
|
|
|
|
|
2013-09-13 17:01:40 +00:00
|
|
|
### If you are using Emacs, here are some basic configurations
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
(custom-set-variables
|
|
|
|
'(c-basic-offset 4)
|
|
|
|
'(global-font-lock-mode t nil (font-lock))
|
|
|
|
'(show-paren-mode t nil (paren))
|
|
|
|
'(transient-mark-mode t))
|
|
|
|
|
|
|
|
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(setq visible-bell t)
|
|
|
|
(setq-default indent-tabs-mode nil)
|
|
|
|
(setq visible-bell t)
|
|
|
|
(column-number-mode 1)
|
|
|
|
|
|
|
|
;; Coding Style
|
|
|
|
(setq auto-mode-alist (cons '("\\.h$" . c++-mode) auto-mode-alist))
|
|
|
|
(defconst my-cc-style
|
|
|
|
'("cc-mode"
|
|
|
|
(c-offsets-alist . ((innamespace . [0])))))
|
|
|
|
(c-add-style "my-cc-mode" my-cc-style)
|
|
|
|
(add-hook 'c++-mode-hook '(lambda ()
|
|
|
|
(c-set-style "my-cc-mode")
|
|
|
|
(gtags-mode 1)
|
|
|
|
))
|
|
|
|
|
|
|
|
;; C++ 11 new keywords
|
|
|
|
(font-lock-add-keywords 'c++-mode
|
|
|
|
'(("\\<\\(thread_local\\)\\>" . font-lock-warning-face)
|
|
|
|
("\\<\\(constexpr\\)\\>" . font-lock-keyword-face)
|
|
|
|
))
|
2017-01-17 19:32:27 +00:00
|
|
|
|
|
|
|
You need to also set up the [Emacs Mode](../../src/emacs/README.md).
|