Commit 7f880f1c authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

updated instructions on directory structure

parent d03cdeec
......@@ -40,23 +40,25 @@ the files on your computer.
### Clone from Git repository ###
Create folder `tpcclib` for source codes and building, and clone the sources of a specific
TPCCLIB release:
TPCCLIB release into a new folder `src`:
~~~~~~~~~~~~~~~~~~
cd
mkdir tpcclib
cd tpcclib
git clone --depth 1 --branch v0.7.4 https://gitlab.utu.fi/vesoik/tpcclib.git
git clone --depth 1 --branch v0.7.4 https://gitlab.utu.fi/vesoik/tpcclib.git src
~~~~~~~~~~~~~~~~~~
Change the version number in the `--branch` option to the latest release. If you want to build
the most recent source code versions (not recommended for production use), then leave out
the option `--branch v0.7.4`. If you are a programmer and plan to edit the source codes and
commit the changes, you should leave out both options.
commit the changes, you should leave out both options, and use your UTU user name:
git clone https://username@gitlab.utu.fi/vesoik/tpcclib.git src
## Compilation ##
The Git commit above wrote the source codes into folder ~/tpcclib/tpcclib/.
The Git commit above wrote the source codes into folder ~/tpcclib/src/.
Create the build path(s), **not under the source path**, and not under network folders, or
shared folders in virtual machine, because that would lead to "Clock skew detected" warnings
and incomplete or failed compilation.
......@@ -65,20 +67,20 @@ If you are building executables for the current operating system only, then the
directory structure is this:
tpcclib
├───tpcclib
├───src
└───build
If you will build executables for Linux and Windows and/or both 32- and 64-bit systems, then
create separate build folder for each system:
tpcclib
├───tpcclib
├───src
├───linux
├───win64
└───win32
Move into the build directory, and then run `cmake` command, specifying the source path
(in this example `../tpcclib`), and optionally (-G) the make system generator
(in this example `../src`), and optionally (-G) the make system generator
(run `cmake --help` to see available options). See below for [examples](#examples).
Then run `make` (in Linux, macOS, and Git for Windows bash shell with GCC):
......@@ -147,7 +149,7 @@ Create [Doxygen](http://doxygen.org) documentation for the library, if necessary
to the source code directory, and then executing `doxygen` in each of the main source folders:
~~~~~~~~~~~~~~~~~~
cd ~/tpcclib/tpcclib
cd ~/tpcclib/src
doxygen
cd v1
doxygen
......@@ -168,7 +170,7 @@ for which you have built the programs:
tpcclib
├───packages
├───tpcclib
├───src
├───tpcclib-doc
├───linux
│ ├───bin
......@@ -179,8 +181,8 @@ for which you have built the programs:
└───bin
Distributable source and binary packages will be located in `packages` folder,
library documentation in `tpcclib-doc` folder, usage information for binaries
in `win64/doc` and compiled binaries in the `bin` folder(s).
library documentation in `tpcclib-doc` folder, usage information for binaries in `win64/doc`, and
compiled binaries in the `bin` folder(s).
<a name="examples"></a>
......@@ -191,7 +193,7 @@ in `win64/doc` and compiled binaries in the `bin` folder(s).
~~~~~~~~~~~~~~~~~~
cd ~/tpcclib/build
cmake ../tpcclib
cmake ../src
make -j 2 install
ctest --output-on-failure --parallel 2
make -j 2 package package_source
......@@ -207,7 +209,7 @@ Using GCC from [Equation Solution](http://www.equation.com/):
~~~~~~~~~~~~~~~~~~
cd ~/tpcclib/build
cmake -G "MSYS Makefiles" ../tpcclib
cmake -G "MSYS Makefiles" ../src
make -j 2 install
ctest --output-on-failure --parallel 2
make -j 2 package
......@@ -221,7 +223,7 @@ a 64-bit platform. To make distributions for 32-bit Windows in a 64-bit platform
~~~~~~~~~~~~~~~~~~
cd ~/tpcclib/win32
cmake -G "MSYS Makefiles" -D CMAKE_C_FLAGS:STRING="-m32" ../tpcclib
cmake -G "MSYS Makefiles" -D CMAKE_C_FLAGS:STRING="-m32" ../src
make install
~~~~~~~~~~~~~~~~~~
......@@ -236,7 +238,7 @@ it may help to include link option -s to remove all symbol table and relocation
information from (temporary) executables. For example:
~~~~~~~~~~~~~~~~~~
cmake -G "MSYS Makefiles" -D CMAKE_C_FLAGS:STRING="-m32 -s" ../tpcclib
cmake -G "MSYS Makefiles" -D CMAKE_C_FLAGS:STRING="-m32 -s" ../src
~~~~~~~~~~~~~~~~~~
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment