Merged branch 'master' of https://github.com/Nemo1369/libcds
[libcds.git] / cds / details / defs.h
index c2fe82d5f04f5c0b271989e5f862adefee0b9310..b1f0331c7c4c84c54ffe1a1b66693e440fae8822 100644 (file)
@@ -1,11 +1,11 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -25,7 +25,7 @@
     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef CDSLIB_DEFS_H
@@ -60,7 +60,7 @@
 
    Supported compilers:
       - GCC 4.8+
-      - Clang 3.3+
+      - Clang 3.6+
       - MS Visual C++ 2013 Update 4 and above
       - Intel C++ Compiler 15
 
     int plugin_entry_point()
     {
         // Attach the thread if it is not attached yet
-        if ( !cds::threading::Manager::isThreadAttached() )
+        if ( !cds::threading::Manager::isThreadAttached())
             cds::threading::Manager::attachThread();
 
         // Do some work with HP-related containers
    The <b>cds</b> is mostly header-only library. Only small part of library related to GC core functionality
    should be compiled.
 
-   The test projects depends on the following static library from \p boost:
-   - \p boost.thread
-   - \p boost.date_time
+   External dependenies: the tests depends on:
+   - \p boost.thread (thread-loal storage support), boost.system
+   - \p google-test
 
    \par Windows build
 
     - <a href="http://www.boost.org/">boost library</a> 1.51 and above. You should create environment variable
         \p BOOST_PATH containing full path to \p boost root directory (for example, <tt>C:\\libs\\boost_1_57_0</tt>).
 
-   Open solution file <tt>cds\projects\vcX\cds.sln</tt> where \p vcX is the version of
-   Microsoft Visual C++ you use: vc12 for MS VC 2013 Update 4, vc14 for MS VC 2015. The solution
-   contains \p cds project and a lot of test projects. Just build the library using solution.
+   Open solution file <tt>cds\projects\vc14\cds.sln</tt> with Microsoft VisualStudio 2015.
+   The solution contains \p cds project and a lot of test projects. Just build the library using solution.
 
    <b>Warning</b>: the solution depends on \p BOOST_PATH environment variable that specifies full path
    to \p boost library root directory. The test projects search \p boost libraries in:
    - for 32bit: <tt>\$(BOOST_PATH)/stage/lib</tt>, <tt>\$(BOOST_PATH)/stage32/lib</tt>, and <tt>\$(BOOST_PATH)/bin</tt>.
    - for 64bit: <tt>\$(BOOST_PATH)/stage64/lib</tt> and <tt>\$(BOOST_PATH)/bin</tt>.
 
+   All tests are based on googletest framework. The following environment variables specify
+   where to find gtest include and library directories:
+   - \p GTEST_ROOT - gtest root directory. <tt>\$(GTEST_ROOT)/include</tt> specifies full path to
+        gtest include files;
+   - \p GTEST_LIB64 - the path to 64bit gtest library dir;
+   - \p GTEST_LIB32 - the path to 32bit gtest library dir.
+
    \par *NIX build
 
    For Unix-like systems GCC and Clang compilers are supported.
-   Use GCC 4.8+ compiler or Clang 3.3+ to build <b>cds</b> library. The distributive contains
-   makefile and <tt>build.sh</tt> script in <tt>build</tt> directory.
-   The <tt>build/sample</tt> directory contains sample scripts for different operating systems and
-   processor architectures.
-   The <tt>build.sh</tt> script supports the following options:
-   - <tt>-c toolset</tt> - Toolset name, possible values: <tt>gcc</tt> (default), <tt>clang</tt>, <tt>icc</tt>
-   - <tt>-x compiler</tt> - C++ compiler name (e.g. g++, g++-4.5 and so on)
-   - <tt>-p arch</tt> - processor architecture; possible values for arch are: x86, amd64 (x86_64), sparc, ia64, ppc64
-   - <tt>-o OStype</tt> - OS family; possible values for OStype are: linux, sunos (solaris), hpux, mingw
-   - <tt>-D define</tt> additional defines
-   - <tt>-b bits</tt> - bits to build, accepts 64, 32
-   - <tt>-l "options"</tt> - extra linker options (in quotes)
-   - <tt>-z "options"</tt> - extra compiler options (in quotes)
-   - <tt>--with-boost path</tt> - path to boost include
-   - <tt>--debug-cxx-options "options"</tt> - extra compiler options for debug target
-   - <tt>--debug-ld-options "options"</tt> - extra linker options for debug target
-   - <tt>--release-cxx-options "options"</tt> - extra compiler options for release target
-   - <tt>--release-ld-options "optons"</tt> - extra linker options for release target
-   - <tt>--clean</tt> - clean all before building
-   - <tt>--debug-test</tt> - make unit test in debug mode; by defalt release unit test generated
-   - <tt>--amd64-use-128bit</tt> - compile with supporting 128bit (16byte) CAS on amd64 (for am64 only)
+   Use GCC 4.8+ compiler or Clang 3.6+ to build <b>cds</b> library with CMake.
+   See accompanying file <tt>/build/cmake/readme.md</tt> for more info.
 
    @note Important for GCC compiler: all your projects that use \p libcds must be compiled with <b>-fno-strict-aliasing</b>
    compiler flag.
@@ -250,6 +237,7 @@ namespace cds {}
                     - CDS_PROCESSOR_SPARC   Sparc
                     - CDS_PROCESSOR_PPC64   PowerPC64
                     - CDS_PROCESSOR_ARM7    ARM v7
+                    - CDS_PROCESSOR_ARM8    ARM v8
                     - CDS_PROCESSOR_UNKNOWN undefined processor architecture
 
     CDS_PROCESSOR__NAME    The name (string) of processor architecture
@@ -305,6 +293,7 @@ namespace cds {}
 #define CDS_PROCESSOR_AMD64     4
 #define CDS_PROCESSOR_PPC64     5   // PowerPC 64bit
 #define CDS_PROCESSOR_ARM7      7
+#define CDS_PROCESSOR_ARM8      8
 #define CDS_PROCESSOR_UNKNOWN   -1
 
 // Supported OS interfaces
@@ -350,10 +339,12 @@ namespace cds {}
 
 // CDS_VERIFY: Debug - assert(_expr); Release - _expr
 #ifdef CDS_DEBUG
-#   define CDS_VERIFY( _expr )    assert( _expr )
+#   define CDS_VERIFY( _expr )       assert( _expr )
+#   define CDS_VERIFY_FALSE( _expr ) assert( !( _expr ))
 #   define CDS_DEBUG_ONLY( _expr )        _expr
 #else
 #   define CDS_VERIFY( _expr )    _expr
+#   define CDS_VERIFY_FALSE( _expr ) _expr
 #   define CDS_DEBUG_ONLY( _expr )
 #endif