This commit is contained in:
Christopher Warrington 2015-12-18 13:48:09 -08:00
Родитель d576674432
Коммит cbe804b70f
1 изменённых файлов: 44 добавлений и 43 удалений

Просмотреть файл

@ -64,7 +64,7 @@ In the root `bond` directory run:
make
sudo make install
The `build` directory is just an example. Any directory can be used for build
The `build` directory is just an example. Any directory can be used as the build
destination.
In order to build all the C++ and Python tests and examples, a few more
@ -83,13 +83,13 @@ the tests and examples:
make --jobs 8 check
(unit tests are large so you may want to run 4-8 build jobs in parallel,
assuming you have enough memory)
(The unit tests are large so you may want to run 4-8 build jobs in parallel,
assuming you have enough memory.)
### OS X
Install XCode and then run the following command to install required packages
using Homebrew ([http://brew.sh/](http://brew.sh/)):
Install Xcode and then run the following command to install the required
packages using Homebrew ([http://brew.sh/](http://brew.sh/)):
brew install \
cmake \
@ -98,15 +98,15 @@ using Homebrew ([http://brew.sh/](http://brew.sh/)):
boost \
boost-python
(boost-python is optional and only needed for Python support)
(boost-python is optional and only needed for Python support.)
Update cabal package database and install `happy` (only needed for tests):
Update the cabal package database and install `happy` (only needed for tests):
cabal update
cabal install happy
Bond can be built on OS X using either standard \*nix makefiles or XCode. In
order to generate and build makefiles, in the root `bond` directory run:
Bond can be built on OS X using either standard \*nix makefiles or Xcode. In
order to generate and build from makefiles, in the root `bond` directory run:
mkdir build
cd build
@ -114,12 +114,12 @@ order to generate and build makefiles, in the root `bond` directory run:
make
sudo make install
Alternatively, you can generate XCode project by passing `-G Xcode` option to
cmake:
Alternatively, you can generate Xcode projects by passing the `-G Xcode` option
to cmake:
cmake -G Xcode ..
You can build and run unit tests by building the `check` target in XCode or by
You can build and run unit tests by building the `check` target in Xcode or by
running make in the build directory:
make --jobs 8 check
@ -129,10 +129,11 @@ boost-python from source:
brew install --build-from-source boost-python
and tell cmake the location of Homebrew's libpython by setting `PYTHON_LIBRARY`
variable, e.g.:
and tell cmake the location of Homebrew's libpython by setting the
`PYTHON_LIBRARY` variable, e.g.:
cmake .. -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
cmake .. \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
### Windows
@ -149,12 +150,12 @@ If you are building on a network behind a proxy, set the environment variable
set HTTP_PROXY=http://your-proxy-name:80
Update cabal package database:
Update the cabal package database:
cabal update
Now you are ready to build the C# version of Bond. Open the solution file
`cs\cs.sln` in Visual Studio 2013 and build as usual. The C# unit tests can
`cs\cs.sln` in Visual Studio and build as usual. The C# unit tests can
also be run from within the solution.
The C++ and Python versions of Bond additionally require:
@ -174,8 +175,8 @@ pre-built libraries are only needed for unit tests and Python support. If Boost
or Python libraries are not found on the system, then some tests and examples will
not be built.
In order to configure solution for Visual Studio 2013 run the following
commands from the root `bond` directory:
In order to generate a solution to build the C++ and Python versions with Visual
Studio 2013 run the following commands from the root `bond` directory:
mkdir build
cd build
@ -183,7 +184,7 @@ commands from the root `bond` directory:
Instead of `cmake` you can also use `cmake-gui` and specify configuration
settings in the UI. This configuration step has to be performed only once. From
now on you can use the generated solution `build\bond.sln` from Visual Studio
then on you can use the generated solution `build\bond.sln` from Visual Studio
or build from command line using `cmake`:
set PreferredToolArchitecture=x64
@ -195,8 +196,8 @@ In order to build and execute the unit tests and examples run:
cmake --build . --target check -- /maxcpucount:8
Setting `PreferredToolArchitecture=x64` selects the 64-bit toolchain which
dramatically improves build speed (Bond unit tests are too big to build with
32-bit tools). This variable works for Visual Studio 2013 or 2015. For VS 2012 set the
following variable instead:
dramatically improves build speed. (The Bond unit tests are too big to build
with 32-bit tools.) This variable works for Visual Studio 2013 or 2015. For
Visual Studio 2012 set the following environment variable instead:
set _IsNativeEnvironment=true