Add MSVC support for FOLLY_FINAL and FOLLY_OVERRIDE
[folly.git] / README.md
1 Folly: Facebook Open-source Library
2 -----------------------------------
3
4 Folly is an open-source C++ library developed and used at Facebook.
5
6 ###[Get Started](folly/docs/Overview.md)
7
8 Folly is published on Github at https://github.com/facebook/folly; for
9 discussions, there is a Google group at
10 https://groups.google.com/d/forum/facebook-folly.
11
12 Dependencies
13 ------------
14
15 folly requires gcc 4.8+ and a version of boost compiled with C++11 support.
16
17 Please download googletest from
18 https://googletest.googlecode.com/files/gtest-1.7.0.zip and unzip it in the
19 folly/test subdirectory.
20
21 Ubuntu 12.04
22 ------------
23
24 This release is old, requiring many upgrades. However, since Travis CI runs
25 on 12.04, `folly/build/deps_ubuntu_12.04.sh` is provided, and upgrades all
26 the required packages.
27
28 Ubuntu 13.10
29 ------------
30
31 The following packages are required (feel free to cut and paste the apt-get
32 command below):
33
34 ```
35 sudo apt-get install \
36     g++ \
37     automake \
38     autoconf \
39     autoconf-archive \
40     libtool \
41     libboost-all-dev \
42     libevent-dev \
43     libdouble-conversion-dev \
44     libgoogle-glog-dev \
45     libgflags-dev \
46     liblz4-dev \
47     liblzma-dev \
48     libsnappy-dev \
49     make \
50     zlib1g-dev \
51     binutils-dev \
52     libjemalloc-dev \
53     libssl-dev
54 ```
55
56 Ubuntu 14.04 LTS
57 ----------------
58
59 The packages listed above for Ubuntu 13.10 are required, as well as:
60
61 ```
62 sudo apt-get install \
63     libiberty-dev
64 ```
65
66 The above packages are sufficient for Ubuntu 13.10 and Ubuntu 14.04.
67
68 In the folly directory, run
69 ```
70   autoreconf -ivf
71   ./configure
72   make
73   make check
74   sudo make install
75 ```
76
77 OS X (Homebrew)
78 ----
79 folly is available as a Formula and releases may be built via `brew install folly`.
80
81 You may also use `folly/build/bootstrap-osx-homebrew.sh` to build against `master`:
82
83 ```
84   cd folly
85   ./build/bootstrap-osx-homebrew.sh
86   make
87   make check
88 ```
89
90 OS X (MacPorts)
91 ----
92 Install the required packages from MacPorts:
93
94 ```
95   sudo port install \
96     autoconf \
97     automake \
98     boost \
99     gflags \
100     git \
101     google-glog \
102     libevent \
103     libtool \
104     lz4 \
105     lzma \
106     scons \
107     snappy \
108     zlib
109 ```
110
111 Download and install double-conversion:
112
113 ```
114   git clone https://github.com/google/double-conversion.git
115   cd double-conversion
116   cmake -DBUILD_SHARED_LIBS=ON .
117   make
118   sudo make install
119 ```
120
121 Download and install folly with the parameters listed below:
122
123 ```
124   git clone https://github.com/facebook/folly.git
125   cd folly/folly
126   autoreconf -ivf
127   ./configure CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib"
128   make
129   sudo make install
130 ```
131
132 Other Linux distributions
133 -------------------------
134
135 - double-conversion (https://github.com/google/double-conversion)
136
137   Download and build double-conversion.
138   You may need to tell configure where to find it.
139
140   [double-conversion/] `ln -s src double-conversion`
141
142   [folly/] `./configure LDFLAGS=-L$DOUBLE_CONVERSION_HOME/ CPPFLAGS=-I$DOUBLE_CONVERSION_HOME/`
143
144   [folly/] `LD_LIBRARY_PATH=$DOUBLE_CONVERSION_HOME/ make`
145
146 - additional platform specific dependencies:
147
148   Fedora 17 64-bit
149     - gcc
150     - gcc-c++
151     - autoconf
152     - autoconf-archive
153     - automake
154     - boost-devel
155     - libtool
156     - lz4-devel
157     - lzma-devel
158     - snappy-devel
159     - zlib-devel
160     - glog-devel
161     - gflags-devel
162     - scons (for double-conversion)