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
|
|
|
|
sudo apt-get install cmake
|
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
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++
|
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
|
|
|
|
|
|
|
### Fork Lean on github : https://github.com/leodemoura/lean
|
|
|
|
|
|
|
|
### 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
|
|
|
|
|
|
|
### Build Lean in debug mode
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
cd lean
|
|
|
|
mkdir -p build/debug
|
|
|
|
cd build/debug
|
|
|
|
cmake -D CMAKE_BUILD_TYPE=Debug ../../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)
|
|
|
|
))
|