STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
config.h
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 /***************************************************************************
3  * include/stxxl/bits/config.h.in
4  *
5  * Template file processed by cmake to set all define switches for this build
6  * according to the cmake build options.
7  *
8  * Part of the STXXL. See http://stxxl.sourceforge.net
9  *
10  * Copyright (C) 2012-2013 Timo Bingmann <[email protected]>
11  *
12  * Distributed under the Boost Software License, Version 1.0.
13  * (See accompanying file LICENSE_1_0.txt or copy at
14  * http://www.boost.org/LICENSE_1_0.txt)
15  **************************************************************************/
16 
17 #ifndef STXXL_CONFIG_HEADER
18 #define STXXL_CONFIG_HEADER
19 
20 // the STXXL library version variables
21 #define STXXL_VERSION_MAJOR ${STXXL_VERSION_MAJOR}
22 #define STXXL_VERSION_MINOR ${STXXL_VERSION_MINOR}
23 #define STXXL_VERSION_PATCH ${STXXL_VERSION_PATCH}
24 #define STXXL_VERSION_STRING "${STXXL_VERSION_STRING}"
25 #define STXXL_VERSION_PHASE "${STXXL_VERSION_PHASE}"
26 
27 // if this is a git repository, add the refspec and commit sha
28 #cmakedefine STXXL_VERSION_GIT_REFSPEC "${STXXL_VERSION_GIT_REFSPEC}"
29 #cmakedefine STXXL_VERSION_GIT_SHA1 "${STXXL_VERSION_GIT_SHA1}"
30 
31 #ifndef STXXL_DEBUG_ASSERTIONS
32 #cmakedefine STXXL_DEBUG_ASSERTIONS ${STXXL_DEBUG_ASSERTIONS}
33 #endif
34 // default: off
35 // cmake: option
36 // effect: enable more costly assertions and checks for debugging the library
37 
38 #cmakedefine STXXL_DIRECT_IO_OFF ${STXXL_DIRECT_IO_OFF}
39 // default: 0/1 (platform dependent)
40 // cmake: detection of platform and flag
41 // effect: disables use of O_DIRECT flag on unsupported platforms
42 
43 #cmakedefine STXXL_HAVE_MMAP_FILE ${STXXL_HAVE_MMAP_FILE}
44 // default: 0/1 (platform dependent)
45 // used in: io/mmap_file.h/cpp
46 // effect: enables/disables memory mapped file implementation
47 
48 #cmakedefine STXXL_HAVE_LINUXAIO_FILE ${STXXL_HAVE_LINUXAIO_FILE}
49 // default: 0/1 (platform dependent)
50 // used in: io/linuxaio_file.h/cpp
51 // effect: enables/disables Linux AIO file implementation
52 
53 #cmakedefine STXXL_POSIX_THREADS ${STXXL_POSIX_THREADS}
54 // default: off
55 // cmake: detection of pthreads by cmake
56 // effect: uses POSIX thread and mutexes on linux
57 
58 #cmakedefine STXXL_STD_THREADS ${STXXL_STD_THREADS}
59 // default: off
60 // cmake: detection of <thread> and <mutex>
61 // effect: uses std thread and mutex on windows or (forced on linux)
62 
63 #cmakedefine STXXL_WINDOWS ${STXXL_WINDOWS}
64 // default: off
65 // cmake: detection of ms windows platform (32- or 64-bit)
66 // effect: enables windows-specific api calls (mingw or msvc)
67 
68 #cmakedefine STXXL_MSVC ${STXXL_MSVC}
69 // default: off
70 // cmake: detection of ms visual c++ via CMake (contains version number)
71 // effect: enables msvc-specific headers and macros
72 
73 #cmakedefine STXXL_HAVE_CXX11_RANGE_FOR_LOOP ${STXXL_HAVE_CXX11_RANGE_FOR_LOOP}
74 // default: off
75 // run-time: detection C++11 support for "for (auto i : obj) { }"
76 // effect: enables some C++11 construct (currently only allowed in examples)
77 
78 #cmakedefine STXXL_HAVE_SYNC_ADD_AND_FETCH ${STXXL_HAVE_SYNC_ADD_AND_FETCH}
79 // default: off
80 // cmake: detection of __sync_add_and_fetch() intrinsic
81 // effect: enables use of atomics in counting_ptr
82 
83 #cmakedefine STXXL_PARALLEL ${STXXL_PARALLEL}
84 // default: on/off (depends on compiler and platform)
85 // cmake: -DUSE_PARALLEL=ON
86 // effect: enable parallelized algorithms using OpenMP like multiway_merge and sort
87 
88 #cmakedefine STXXL_WITH_GNU_PARALLEL ${STXXL_WITH_GNU_PARALLEL}
89 // default: off
90 // cmake: -DUSE_GNU_PARALLEL=ON
91 // effect: explicitly enables use of __gnu_parallel algorithms
92 
93 #cmakedefine STXXL_BOOST_CONFIG ${STXXL_BOOST_CONFIG}
94 #cmakedefine STXXL_BOOST_FILESYSTEM ${STXXL_BOOST_FILESYSTEM}
95 #cmakedefine STXXL_BOOST_RANDOM ${STXXL_BOOST_RANDOM}
96 #cmakedefine STXXL_BOOST_THREADS ${STXXL_BOOST_THREADS}
97 #cmakedefine STXXL_BOOST_TIMESTAMP ${STXXL_BOOST_TIMESTAMP}
98 // default: off
99 // cmake: -DUSE_BOOST=ON
100 // effect: enables use of boost libraries in different parts of STXXL.
101 
102 #if STXXL_BOOST_CONFIG
103  #include <boost/config.hpp>
104 #endif
105 
106 #cmakedefine STXXL_STD_RANDOM ${STXXL_STD_RANDOM}
107 // default: off
108 // cmake: detection of <random>
109 // effect: uses std random generator on windows or (forced on linux)
110 
111 #cmakedefine STXXL_HAVE_MALLINFO_PROTO ${STXXL_HAVE_MALLINFO_PROTO}
112 // default: off
113 // cmake: detection of mallinfo() function in <malloc.h>
114 // effect: used by stxxl_tool/mallinfo for malloc stats
115 
116 #cmakedefine STXXL_HAVE_MLOCK_PROTO ${STXXL_HAVE_MLOCK_PROTO}
117 // default: off
118 // cmake: detection of mlock() function in <sys/mman.h>
119 // effect: used by stxxl_tool/mlock for locking physical pages
120 
121 #cmakedefine STXXL_WITH_VALGRIND ${STXXL_WITH_VALGRIND}
122 // default: off
123 // cmake: option USE_VALGRIND=ON
124 // effect: run all tests with valgrind and pre-initialize some memory buffers
125 
126 #endif // !STXXL_CONFIG_HEADER