X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=build%2Fcmake%2Freadme.md;h=6a5aa6a165e92a963fa762d3f03a7ef16628b018;hp=ae2034e505258c271095a03c5a7d5622e534d57a;hb=5cc8dbffef0c946e499fc06d2b0b226ba57082df;hpb=a911060e06a8683864e567239621c4a67de22c7d diff --git a/build/cmake/readme.md b/build/cmake/readme.md index ae2034e5..6a5aa6a1 100644 --- a/build/cmake/readme.md +++ b/build/cmake/readme.md @@ -11,16 +11,25 @@ Compiling and testing ---------- **Building out-of-source in "RELEASE" mode ("DEBUG" is default)** -- Wherever create empty directory for building, for instance *libcds-debug* -- Prepare: *cmake -DCMAKE_BUILD_TYPE=RELEASE * -- Compile: *make -j4* +- Wherever create empty directory for building, for instance `libcds-debug` +- Prepare: `cmake -DCMAKE_BUILD_TYPE=RELEASE ` +- Compile: `make -j4` - As a result you'll see shared and static cds libraries in the build directory -After using command *cmake -L * one can see some additional variables, that can activate additional features: +**Warning**: We strongly recommend not to use static cds library. Static library is not tested and not maintained. You can use it on own risk. + +After using command cmake -L one can see some additional variables, that can activate additional features: + +- `WITH_TESTS:BOOL=OFF`: if you want to build library with unit testing support use *-DWITH_TESTS=ON* on prepare step. Be careful with this flag, because compile time will dramatically increase +- `WITH_TESTS_COVERAGE:BOOL=OFF`: Analyze test coverage using gcov (only for gcc) +- `WITH_BOOST_ATOMIC:BOOL=OFF`: Use boost atomics (only for boost >= 1.54) +- `WITH_ASAN:BOOL=OFF`: compile libcds with AddressSanitizer instrumentation +- `WITH_TSAN:BOOL=OFF`: compile libcds with ThreadSanitizer instrumentation + +Additional gtest hints (for unit and stress tests only): +- `GTEST_INCLUDE_DIRS=path`: gives full `path` to gtest include dir. +- `GTEST_LIBRARY=path`: gives full `path` to `libgtest.a`. -- *WITH_TESTS:BOOL=OFF*: if you want to build library with unit testing support use *-DWITH_TESTS=ON* on prepare step. Be careful with this flag, because compile time will dramatically increase -- *WITH_BOOST_ATOMIC:BOOL=OFF*: Use boost atomics (only for boost >= 1.54) -- ... Packaging ---------- @@ -34,11 +43,11 @@ In order to package library *CPack* is used, command *cpack -G * shou "Live" building and packaging example ---------- -- git clone https://github.com/khizmax/libcds.git -- mkdir libcds-release -- cd libcds-release -- cmake -DWITH\_TESTS=ON -DCMAKE\_BUILD_TYPE=RELEASE ../libcds - +- `git clone https://github.com/khizmax/libcds.git` +- `mkdir libcds-release` +- `cd libcds-release` +- `cmake -DWITH\_TESTS=ON -DCMAKE\_BUILD_TYPE=RELEASE ../libcds` +``` -- The C compiler identification is GNU 4.8.3 -- The CXX compiler identification is GNU 4.8.3 ... @@ -51,9 +60,9 @@ In order to package library *CPack* is used, command *cpack -G * shou -- Configuring done -- Generating done -- Build files have been written to: <...>/libcds-release - -- make -j4 - +``` +- `make -j4` +``` Scanning dependencies of target cds Scanning dependencies of target test-common Scanning dependencies of target cds-s @@ -61,10 +70,10 @@ In order to package library *CPack* is used, command *cpack -G * shou [ 1%] Building CXX object CMakeFiles/cds-s.dir/src/hp_gc.cpp.o ... [100%] Built target test-hdr - gmake: выход из каталога «/home/kel/projects_cds/libcds-debug» - -- ctest +``` +- `ctest` +``` Test project /home/kel/projects_cds/libcds-debug Start 1: test-hdr 1/7 Test #1: test-hdr ......................... Passed 1352.24 sec @@ -72,9 +81,10 @@ In order to package library *CPack* is used, command *cpack -G * shou 2/7 Test #2: cdsu-misc ........................ Passed 0.00 sec Start 3: cdsu-map ... - -- cpack -G RPM +``` +- `cpack -G RPM` +``` CPack: Create package using RPM CPack: Install projects CPack: - Run preinstall target for: cds @@ -87,7 +97,8 @@ In order to package library *CPack* is used, command *cpack -G * shou CPackRPM: Will use GENERATED spec file: /home/kel/projects_cds/libcds-debug/_CPack_Packages/Linux/RPM/SPECS/cds-lib.spec CPack: - package: /home/kel/projects_cds/libcds-debug/cds-2.1.0-1-devel.rpm generated. CPack: - package: /home/kel/projects_cds/libcds-debug/cds-2.1.0-1-lib.rpm generated. - +``` + Future development ---------- - CDash: use CI system \ No newline at end of file