forked from datastax/cpp-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macosx_instruction.txt
59 lines (39 loc) · 2.09 KB
/
macosx_instruction.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
CASSANDRA CPP DRIVER UNDER MAC OS X
NOTES ON BUILDING AND RUNNING
(tested on Mac OS X 10.9)
0. Cassandra and CCM
The easiest way to get Cassandra up and running on Mac is to install CCM (Cassandra
Cluster Manager). CCM will download Cassandra, so we get one less thing to
worry about.
The easiest way to get CCM for Mac is to install it via MacPorts:
sudo port -v sync && sudo port -v install ccm
(In case you don't have MacPorts, install it by following the instructions at
http://www.macports.org/install.php)
Remeber to set up loopback aliases if you want to spawn more than one Cassandra node:
sudo ifconfig lo0 alias 127.0.0.2 up
sudo ifconfig lo0 alias 127.0.0.3 up
sudo ifconfig lo0 alias 127.0.0.4 up
...
At this stage CCM should work fine.
-------------------------------------------------------------------------------
1. The toolchain
The following procedure aims at setting up Clang toolchain to build our cpp-driver,
with Xcode as the preferred IDE.
a. Update the Xcode to the recent version (5.0.1 at the time of this writing)
b. Launch Xcode and go to Preferences->Downloads. Download and install the latest
command line tools.
Now you need to get the Boost libraries. There is one caveat, though: Boost
packaged by Homebrew is linked by default against GNU libstdc++. We suggest to
stick to the libc++ throughout the further development and not to mix both standard
libraries. We therefore need to build the Boost with Clang and link it with libc++.
This is easiest done by:
brew update
brew install boost --c++11
(Yes, Homebrew will complain about Macports and Homebrew being used at the same time.
Unfortunately, Homebrew does not have a CCM package, so we had to use MacPorts there.)
-------------------------------------------------------------------------------
2. Building the cpp driver
This one is relatively straightforward. Once you have all the libraries installed, just run
the CMake in 'cpp-driver's root folder:
cmake -G "Xcode"
-------------------------------------------------------------------------------