annotate openmp/README.rst @ 165:597b3f1c2c93

fix call createTailCallEliminationPass
author anatofuz
date Tue, 24 Mar 2020 15:30:52 +0900
parents 1d019706d866
children 0572611fdcc8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ========================================
anatofuz
parents:
diff changeset
2 How to Build the LLVM* OpenMP* Libraries
anatofuz
parents:
diff changeset
3 ========================================
anatofuz
parents:
diff changeset
4 This repository requires `CMake <http://www.cmake.org/>`_ v2.8.0 or later. LLVM
anatofuz
parents:
diff changeset
5 and Clang need a more recent version which also applies for in-tree builds. For
anatofuz
parents:
diff changeset
6 more information than available in this document please see
anatofuz
parents:
diff changeset
7 `LLVM's CMake documentation <http://llvm.org/docs/CMake.html>`_ and the
anatofuz
parents:
diff changeset
8 `official documentation <https://cmake.org/cmake/help/v2.8.0/cmake.html>`_.
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 .. contents::
anatofuz
parents:
diff changeset
11 :local:
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 How to Call CMake Initially, then Repeatedly
anatofuz
parents:
diff changeset
14 ============================================
anatofuz
parents:
diff changeset
15 - When calling CMake for the first time, all needed compiler options must be
anatofuz
parents:
diff changeset
16 specified on the command line. After this initial call to CMake, the compiler
anatofuz
parents:
diff changeset
17 definitions must not be included for further calls to CMake. Other options
anatofuz
parents:
diff changeset
18 can be specified on the command line multiple times including all definitions
anatofuz
parents:
diff changeset
19 in the build options section below.
anatofuz
parents:
diff changeset
20 - Example of configuring, building, reconfiguring, rebuilding:
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 .. code-block:: console
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 $ mkdir build
anatofuz
parents:
diff changeset
25 $ cd build
anatofuz
parents:
diff changeset
26 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. # Initial configuration
anatofuz
parents:
diff changeset
27 $ make
anatofuz
parents:
diff changeset
28 ...
anatofuz
parents:
diff changeset
29 $ make clean
anatofuz
parents:
diff changeset
30 $ cmake -DCMAKE_BUILD_TYPE=Debug .. # Second configuration
anatofuz
parents:
diff changeset
31 $ make
anatofuz
parents:
diff changeset
32 ...
anatofuz
parents:
diff changeset
33 $ rm -rf *
anatofuz
parents:
diff changeset
34 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. # Third configuration
anatofuz
parents:
diff changeset
35 $ make
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 - Notice in the example how the compiler definitions are only specified for an
anatofuz
parents:
diff changeset
38 empty build directory, but other build options are used at any time.
anatofuz
parents:
diff changeset
39 - The file ``CMakeCache.txt`` which is created after the first call to CMake is
anatofuz
parents:
diff changeset
40 a configuration file which holds all values for the build options. These
anatofuz
parents:
diff changeset
41 values can be changed using a text editor to modify ``CMakeCache.txt`` as
anatofuz
parents:
diff changeset
42 opposed to using definitions on the command line.
anatofuz
parents:
diff changeset
43 - To have CMake create a particular type of build generator file simply include
anatofuz
parents:
diff changeset
44 the ``-G <Generator name>`` option:
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 .. code-block:: console
anatofuz
parents:
diff changeset
47
anatofuz
parents:
diff changeset
48 $ cmake -G "Unix Makefiles" ...
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 You can see a list of generators CMake supports by executing the cmake command
anatofuz
parents:
diff changeset
51 with no arguments.
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 Instructions to Build
anatofuz
parents:
diff changeset
54 =====================
anatofuz
parents:
diff changeset
55 .. code-block:: console
anatofuz
parents:
diff changeset
56
anatofuz
parents:
diff changeset
57 $ cd openmp_top_level/ [ this directory with libomptarget/, runtime/, etc. ]
anatofuz
parents:
diff changeset
58 $ mkdir build
anatofuz
parents:
diff changeset
59 $ cd build
anatofuz
parents:
diff changeset
60
anatofuz
parents:
diff changeset
61 [ Unix* Libraries ]
anatofuz
parents:
diff changeset
62 $ cmake -DCMAKE_C_COMPILER=<C Compiler> -DCMAKE_CXX_COMPILER=<C++ Compiler> ..
anatofuz
parents:
diff changeset
63
anatofuz
parents:
diff changeset
64 [ Windows* Libraries ]
anatofuz
parents:
diff changeset
65 $ cmake -G <Generator Type> -DCMAKE_C_COMPILER=<C Compiler> -DCMAKE_CXX_COMPILER=<C++ Compiler> -DCMAKE_ASM_MASM_COMPILER=[ml | ml64] -DCMAKE_BUILD_TYPE=Release ..
anatofuz
parents:
diff changeset
66
anatofuz
parents:
diff changeset
67 $ make
anatofuz
parents:
diff changeset
68 $ make install
anatofuz
parents:
diff changeset
69
anatofuz
parents:
diff changeset
70 CMake Options
anatofuz
parents:
diff changeset
71 =============
anatofuz
parents:
diff changeset
72 Builds with CMake can be customized by means of options as already seen above.
anatofuz
parents:
diff changeset
73 One possibility is to pass them via the command line:
anatofuz
parents:
diff changeset
74
anatofuz
parents:
diff changeset
75 .. code-block:: console
anatofuz
parents:
diff changeset
76
anatofuz
parents:
diff changeset
77 $ cmake -DOPTION=<value> path/to/source
anatofuz
parents:
diff changeset
78
anatofuz
parents:
diff changeset
79 .. note:: The first value listed is the respective default for that option.
anatofuz
parents:
diff changeset
80
anatofuz
parents:
diff changeset
81 Generic Options
anatofuz
parents:
diff changeset
82 ---------------
anatofuz
parents:
diff changeset
83 For full documentation consult the CMake manual or execute
anatofuz
parents:
diff changeset
84 ``cmake --help-variable VARIABLE_NAME`` to get information about a specific
anatofuz
parents:
diff changeset
85 variable.
anatofuz
parents:
diff changeset
86
anatofuz
parents:
diff changeset
87 **CMAKE_BUILD_TYPE** = ``Release|Debug|RelWithDebInfo``
anatofuz
parents:
diff changeset
88 Build type can be ``Release``, ``Debug``, or ``RelWithDebInfo`` which chooses
anatofuz
parents:
diff changeset
89 the optimization level and presence of debugging symbols.
anatofuz
parents:
diff changeset
90
anatofuz
parents:
diff changeset
91 **CMAKE_C_COMPILER** = <C compiler name>
anatofuz
parents:
diff changeset
92 Specify the C compiler.
anatofuz
parents:
diff changeset
93
anatofuz
parents:
diff changeset
94 **CMAKE_CXX_COMPILER** = <C++ compiler name>
anatofuz
parents:
diff changeset
95 Specify the C++ compiler.
anatofuz
parents:
diff changeset
96
anatofuz
parents:
diff changeset
97 **CMAKE_Fortran_COMPILER** = <Fortran compiler name>
anatofuz
parents:
diff changeset
98 Specify the Fortran compiler. This option is only needed when
anatofuz
parents:
diff changeset
99 **LIBOMP_FORTRAN_MODULES** is ``ON`` (see below). So typically, a Fortran
anatofuz
parents:
diff changeset
100 compiler is not needed during the build.
anatofuz
parents:
diff changeset
101
anatofuz
parents:
diff changeset
102 **CMAKE_ASM_MASM_COMPILER** = ``ml|ml64``
anatofuz
parents:
diff changeset
103 This option is only relevant for Windows*.
anatofuz
parents:
diff changeset
104
anatofuz
parents:
diff changeset
105 Options for all Libraries
anatofuz
parents:
diff changeset
106 -------------------------
anatofuz
parents:
diff changeset
107
anatofuz
parents:
diff changeset
108 **OPENMP_ENABLE_WERROR** = ``OFF|ON``
anatofuz
parents:
diff changeset
109 Treat warnings as errors and fail, if a compiler warning is triggered.
anatofuz
parents:
diff changeset
110
anatofuz
parents:
diff changeset
111 **OPENMP_LIBDIR_SUFFIX** = ``""``
anatofuz
parents:
diff changeset
112 Extra suffix to append to the directory where libraries are to be installed.
anatofuz
parents:
diff changeset
113
anatofuz
parents:
diff changeset
114 **OPENMP_TEST_C_COMPILER** = ``${CMAKE_C_COMPILER}``
anatofuz
parents:
diff changeset
115 Compiler to use for testing. Defaults to the compiler that was also used for
anatofuz
parents:
diff changeset
116 building.
anatofuz
parents:
diff changeset
117
anatofuz
parents:
diff changeset
118 **OPENMP_TEST_CXX_COMPILER** = ``${CMAKE_CXX_COMPILER}``
anatofuz
parents:
diff changeset
119 Compiler to use for testing. Defaults to the compiler that was also used for
anatofuz
parents:
diff changeset
120 building.
anatofuz
parents:
diff changeset
121
anatofuz
parents:
diff changeset
122 **OPENMP_LLVM_TOOLS_DIR** = ``/path/to/built/llvm/tools``
anatofuz
parents:
diff changeset
123 Additional path to search for LLVM tools needed by tests.
anatofuz
parents:
diff changeset
124
anatofuz
parents:
diff changeset
125 **OPENMP_LLVM_LIT_EXECUTABLE** = ``/path/to/llvm-lit``
anatofuz
parents:
diff changeset
126 Specify full path to ``llvm-lit`` executable for running tests. The default
anatofuz
parents:
diff changeset
127 is to search the ``PATH`` and the directory in **OPENMP_LLVM_TOOLS_DIR**.
anatofuz
parents:
diff changeset
128
anatofuz
parents:
diff changeset
129 **OPENMP_FILECHECK_EXECUTABLE** = ``/path/to/FileCheck``
anatofuz
parents:
diff changeset
130 Specify full path to ``FileCheck`` executable for running tests. The default
anatofuz
parents:
diff changeset
131 is to search the ``PATH`` and the directory in **OPENMP_LLVM_TOOLS_DIR**.
anatofuz
parents:
diff changeset
132
anatofuz
parents:
diff changeset
133 Options for ``libomp``
anatofuz
parents:
diff changeset
134 ----------------------
anatofuz
parents:
diff changeset
135
anatofuz
parents:
diff changeset
136 **LIBOMP_ARCH** = ``aarch64|arm|i386|mic|mips|mips64|ppc64|ppc64le|x86_64|riscv64``
anatofuz
parents:
diff changeset
137 The default value for this option is chosen based on probing the compiler for
anatofuz
parents:
diff changeset
138 architecture macros (e.g., is ``__x86_64__`` predefined by compiler?).
anatofuz
parents:
diff changeset
139
anatofuz
parents:
diff changeset
140 **LIBOMP_MIC_ARCH** = ``knc|knf``
anatofuz
parents:
diff changeset
141 Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) to
anatofuz
parents:
diff changeset
142 build for. This value is ignored if **LIBOMP_ARCH** does not equal ``mic``.
anatofuz
parents:
diff changeset
143
anatofuz
parents:
diff changeset
144 **LIBOMP_LIB_TYPE** = ``normal|profile|stubs``
anatofuz
parents:
diff changeset
145 Library type can be ``normal``, ``profile``, or ``stubs``.
anatofuz
parents:
diff changeset
146
anatofuz
parents:
diff changeset
147 **LIBOMP_USE_VERSION_SYMBOLS** = ``ON|OFF``
anatofuz
parents:
diff changeset
148 Use versioned symbols for building the library. This option only makes sense
anatofuz
parents:
diff changeset
149 for ELF based libraries where version symbols are supported (Linux*, some BSD*
anatofuz
parents:
diff changeset
150 variants). It is ``OFF`` by default for Windows* and macOS*, but ``ON`` for
anatofuz
parents:
diff changeset
151 other Unix based operating systems.
anatofuz
parents:
diff changeset
152
anatofuz
parents:
diff changeset
153 **LIBOMP_ENABLE_SHARED** = ``ON|OFF``
anatofuz
parents:
diff changeset
154 Build a shared library. If this option is ``OFF``, static OpenMP libraries
anatofuz
parents:
diff changeset
155 will be built instead of dynamic ones.
anatofuz
parents:
diff changeset
156
anatofuz
parents:
diff changeset
157 .. note::
anatofuz
parents:
diff changeset
158
anatofuz
parents:
diff changeset
159 Static libraries are not supported on Windows*.
anatofuz
parents:
diff changeset
160
anatofuz
parents:
diff changeset
161 **LIBOMP_FORTRAN_MODULES** = ``OFF|ON``
anatofuz
parents:
diff changeset
162 Create the Fortran modules (requires Fortran compiler).
anatofuz
parents:
diff changeset
163
anatofuz
parents:
diff changeset
164 macOS* Fat Libraries
anatofuz
parents:
diff changeset
165 """"""""""""""""""""
anatofuz
parents:
diff changeset
166 On macOS* machines, it is possible to build universal (or fat) libraries which
anatofuz
parents:
diff changeset
167 include both i386 and x86_64 architecture objects in a single archive.
anatofuz
parents:
diff changeset
168
anatofuz
parents:
diff changeset
169 .. code-block:: console
anatofuz
parents:
diff changeset
170
anatofuz
parents:
diff changeset
171 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_OSX_ARCHITECTURES='i386;x86_64' ..
anatofuz
parents:
diff changeset
172 $ make
anatofuz
parents:
diff changeset
173
anatofuz
parents:
diff changeset
174 There is also an option **LIBOMP_OSX_ARCHITECTURES** which can be set in case
anatofuz
parents:
diff changeset
175 this is an LLVM source tree build. It will only apply for the ``libomp`` library
anatofuz
parents:
diff changeset
176 avoids having the entire LLVM/Clang build produce universal binaries.
anatofuz
parents:
diff changeset
177
anatofuz
parents:
diff changeset
178 Optional Features
anatofuz
parents:
diff changeset
179 """""""""""""""""
anatofuz
parents:
diff changeset
180
anatofuz
parents:
diff changeset
181 **LIBOMP_USE_ADAPTIVE_LOCKS** = ``ON|OFF``
anatofuz
parents:
diff changeset
182 Include adaptive locks, based on Intel(R) Transactional Synchronization
anatofuz
parents:
diff changeset
183 Extensions (Intel(R) TSX). This feature is x86 specific and turned ``ON``
anatofuz
parents:
diff changeset
184 by default for IA-32 architecture and Intel(R) 64 architecture.
anatofuz
parents:
diff changeset
185
anatofuz
parents:
diff changeset
186 **LIBOMP_USE_INTERNODE_ALIGNMENT** = ``OFF|ON``
anatofuz
parents:
diff changeset
187 Align certain data structures on 4096-byte. This option is useful on
anatofuz
parents:
diff changeset
188 multi-node systems where a small ``CACHE_LINE`` setting leads to false sharing.
anatofuz
parents:
diff changeset
189
anatofuz
parents:
diff changeset
190 **LIBOMP_OMPT_SUPPORT** = ``ON|OFF``
anatofuz
parents:
diff changeset
191 Include support for the OpenMP Tools Interface (OMPT).
anatofuz
parents:
diff changeset
192 This option is supported and ``ON`` by default for x86, x86_64, AArch64,
anatofuz
parents:
diff changeset
193 PPC64 and RISCV64 on Linux* and macOS*.
anatofuz
parents:
diff changeset
194 This option is ``OFF`` if this feature is not supported for the platform.
anatofuz
parents:
diff changeset
195
anatofuz
parents:
diff changeset
196 **LIBOMP_OMPT_OPTIONAL** = ``ON|OFF``
anatofuz
parents:
diff changeset
197 Include support for optional OMPT functionality. This option is ignored if
anatofuz
parents:
diff changeset
198 **LIBOMP_OMPT_SUPPORT** is ``OFF``.
anatofuz
parents:
diff changeset
199
anatofuz
parents:
diff changeset
200 **LIBOMP_STATS** = ``OFF|ON``
anatofuz
parents:
diff changeset
201 Include stats-gathering code.
anatofuz
parents:
diff changeset
202
anatofuz
parents:
diff changeset
203 **LIBOMP_USE_DEBUGGER** = ``OFF|ON``
anatofuz
parents:
diff changeset
204 Include the friendly debugger interface.
anatofuz
parents:
diff changeset
205
anatofuz
parents:
diff changeset
206 **LIBOMP_USE_HWLOC** = ``OFF|ON``
anatofuz
parents:
diff changeset
207 Use `OpenMPI's hwloc library <https://www.open-mpi.org/projects/hwloc/>`_ for
anatofuz
parents:
diff changeset
208 topology detection and affinity.
anatofuz
parents:
diff changeset
209
anatofuz
parents:
diff changeset
210 **LIBOMP_HWLOC_INSTALL_DIR** = ``/path/to/hwloc/install/dir``
anatofuz
parents:
diff changeset
211 Specify install location of hwloc. The configuration system will look for
anatofuz
parents:
diff changeset
212 ``hwloc.h`` in ``${LIBOMP_HWLOC_INSTALL_DIR}/include`` and the library in
anatofuz
parents:
diff changeset
213 ``${LIBOMP_HWLOC_INSTALL_DIR}/lib``. The default is ``/usr/local``.
anatofuz
parents:
diff changeset
214 This option is only used if **LIBOMP_USE_HWLOC** is ``ON``.
anatofuz
parents:
diff changeset
215
anatofuz
parents:
diff changeset
216 Additional Compiler Flags
anatofuz
parents:
diff changeset
217 """""""""""""""""""""""""
anatofuz
parents:
diff changeset
218
anatofuz
parents:
diff changeset
219 These flags are **appended**, they do not overwrite any of the preset flags.
anatofuz
parents:
diff changeset
220
anatofuz
parents:
diff changeset
221 **LIBOMP_CPPFLAGS** = <space-separated flags>
anatofuz
parents:
diff changeset
222 Additional C preprocessor flags.
anatofuz
parents:
diff changeset
223
anatofuz
parents:
diff changeset
224 **LIBOMP_CXXFLAGS** = <space-separated flags>
anatofuz
parents:
diff changeset
225 Additional C++ compiler flags.
anatofuz
parents:
diff changeset
226
anatofuz
parents:
diff changeset
227 **LIBOMP_ASMFLAGS** = <space-separated flags>
anatofuz
parents:
diff changeset
228 Additional assembler flags.
anatofuz
parents:
diff changeset
229
anatofuz
parents:
diff changeset
230 **LIBOMP_LDFLAGS** = <space-separated flags>
anatofuz
parents:
diff changeset
231 Additional linker flags.
anatofuz
parents:
diff changeset
232
anatofuz
parents:
diff changeset
233 **LIBOMP_LIBFLAGS** = <space-separated flags>
anatofuz
parents:
diff changeset
234 Additional libraries to link.
anatofuz
parents:
diff changeset
235
anatofuz
parents:
diff changeset
236 **LIBOMP_FFLAGS** = <space-separated flags>
anatofuz
parents:
diff changeset
237 Additional Fortran compiler flags.
anatofuz
parents:
diff changeset
238
anatofuz
parents:
diff changeset
239 Options for ``libomptarget``
anatofuz
parents:
diff changeset
240 ----------------------------
anatofuz
parents:
diff changeset
241
anatofuz
parents:
diff changeset
242 **LIBOMPTARGET_OPENMP_HEADER_FOLDER** = ``""``
anatofuz
parents:
diff changeset
243 Path of the folder that contains ``omp.h``. This is required for testing
anatofuz
parents:
diff changeset
244 out-of-tree builds.
anatofuz
parents:
diff changeset
245
anatofuz
parents:
diff changeset
246 **LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER** = ``""``
anatofuz
parents:
diff changeset
247 Path of the folder that contains ``libomp.so``. This is required for testing
anatofuz
parents:
diff changeset
248 out-of-tree builds.
anatofuz
parents:
diff changeset
249
anatofuz
parents:
diff changeset
250 Options for ``NVPTX device RTL``
anatofuz
parents:
diff changeset
251 --------------------------------
anatofuz
parents:
diff changeset
252
anatofuz
parents:
diff changeset
253 **LIBOMPTARGET_NVPTX_ENABLE_BCLIB** = ``ON|OFF``
anatofuz
parents:
diff changeset
254 Enable CUDA LLVM bitcode offloading device RTL. This is used for link time
anatofuz
parents:
diff changeset
255 optimization of the OMP runtime and application code. This option is enabled
anatofuz
parents:
diff changeset
256 by default if the build system determines that `CMAKE_C_COMPILER` is able to
anatofuz
parents:
diff changeset
257 compile and link the library.
anatofuz
parents:
diff changeset
258
anatofuz
parents:
diff changeset
259 **LIBOMPTARGET_NVPTX_CUDA_COMPILER** = ``""``
anatofuz
parents:
diff changeset
260 Location of a CUDA compiler capable of emitting LLVM bitcode. Currently only
anatofuz
parents:
diff changeset
261 the Clang compiler is supported. This is only used when building the CUDA LLVM
anatofuz
parents:
diff changeset
262 bitcode offloading device RTL. If unspecified and the CMake C compiler is
anatofuz
parents:
diff changeset
263 Clang, then Clang is used.
anatofuz
parents:
diff changeset
264
anatofuz
parents:
diff changeset
265 **LIBOMPTARGET_NVPTX_BC_LINKER** = ``""``
anatofuz
parents:
diff changeset
266 Location of a linker capable of linking LLVM bitcode objects. This is only
anatofuz
parents:
diff changeset
267 used when building the CUDA LLVM bitcode offloading device RTL. If unspecified
anatofuz
parents:
diff changeset
268 and the CMake C compiler is Clang and there exists a llvm-link binary in the
anatofuz
parents:
diff changeset
269 directory containing Clang, then this llvm-link binary is used.
anatofuz
parents:
diff changeset
270
anatofuz
parents:
diff changeset
271 **LIBOMPTARGET_NVPTX_ALTERNATE_HOST_COMPILER** = ``""``
anatofuz
parents:
diff changeset
272 Host compiler to use with NVCC. This compiler is not going to be used to
anatofuz
parents:
diff changeset
273 produce any binary. Instead, this is used to overcome the input compiler
anatofuz
parents:
diff changeset
274 checks done by NVCC. E.g. if using a default host compiler that is not
anatofuz
parents:
diff changeset
275 compatible with NVCC, this option can be use to pass to NVCC a valid compiler
anatofuz
parents:
diff changeset
276 to avoid the error.
anatofuz
parents:
diff changeset
277
anatofuz
parents:
diff changeset
278 **LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES** = ``35``
anatofuz
parents:
diff changeset
279 List of CUDA compute capabilities that should be supported by the NVPTX
anatofuz
parents:
diff changeset
280 device RTL. E.g. for compute capabilities 6.0 and 7.0, the option "60,70"
anatofuz
parents:
diff changeset
281 should be used. Compute capability 3.5 is the minimum required.
anatofuz
parents:
diff changeset
282
anatofuz
parents:
diff changeset
283 **LIBOMPTARGET_NVPTX_DEBUG** = ``OFF|ON``
anatofuz
parents:
diff changeset
284 Enable printing of debug messages from the NVPTX device RTL.
anatofuz
parents:
diff changeset
285
anatofuz
parents:
diff changeset
286 Example Usages of CMake
anatofuz
parents:
diff changeset
287 =======================
anatofuz
parents:
diff changeset
288
anatofuz
parents:
diff changeset
289 Typical Invocations
anatofuz
parents:
diff changeset
290 -------------------
anatofuz
parents:
diff changeset
291
anatofuz
parents:
diff changeset
292 .. code-block:: console
anatofuz
parents:
diff changeset
293
anatofuz
parents:
diff changeset
294 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
anatofuz
parents:
diff changeset
295 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
anatofuz
parents:
diff changeset
296 $ cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc ..
anatofuz
parents:
diff changeset
297
anatofuz
parents:
diff changeset
298 Advanced Builds with Various Options
anatofuz
parents:
diff changeset
299 ------------------------------------
anatofuz
parents:
diff changeset
300
anatofuz
parents:
diff changeset
301 - Build the i386 Linux* library using GCC*
anatofuz
parents:
diff changeset
302
anatofuz
parents:
diff changeset
303 .. code-block:: console
anatofuz
parents:
diff changeset
304
anatofuz
parents:
diff changeset
305 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_ARCH=i386 ..
anatofuz
parents:
diff changeset
306
anatofuz
parents:
diff changeset
307 - Build the x86_64 debug Mac library using Clang*
anatofuz
parents:
diff changeset
308
anatofuz
parents:
diff changeset
309 .. code-block:: console
anatofuz
parents:
diff changeset
310
anatofuz
parents:
diff changeset
311 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBOMP_ARCH=x86_64 -DCMAKE_BUILD_TYPE=Debug ..
anatofuz
parents:
diff changeset
312
anatofuz
parents:
diff changeset
313 - Build the library (architecture determined by probing compiler) using the
anatofuz
parents:
diff changeset
314 Intel(R) C Compiler and the Intel(R) C++ Compiler. Also, create Fortran
anatofuz
parents:
diff changeset
315 modules with the Intel(R) Fortran Compiler.
anatofuz
parents:
diff changeset
316
anatofuz
parents:
diff changeset
317 .. code-block:: console
anatofuz
parents:
diff changeset
318
anatofuz
parents:
diff changeset
319 $ cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort -DLIBOMP_FORTRAN_MODULES=on ..
anatofuz
parents:
diff changeset
320
anatofuz
parents:
diff changeset
321 - Have CMake find the C/C++ compiler and specify additional flags for the
anatofuz
parents:
diff changeset
322 preprocessor and C++ compiler.
anatofuz
parents:
diff changeset
323
anatofuz
parents:
diff changeset
324 .. code-blocks:: console
anatofuz
parents:
diff changeset
325
anatofuz
parents:
diff changeset
326 $ cmake -DLIBOMP_CPPFLAGS='-DNEW_FEATURE=1 -DOLD_FEATURE=0' -DLIBOMP_CXXFLAGS='--one-specific-flag --two-specific-flag' ..
anatofuz
parents:
diff changeset
327
anatofuz
parents:
diff changeset
328 - Build the stubs library
anatofuz
parents:
diff changeset
329
anatofuz
parents:
diff changeset
330 .. code-blocks:: console
anatofuz
parents:
diff changeset
331
anatofuz
parents:
diff changeset
332 $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_LIB_TYPE=stubs ..
anatofuz
parents:
diff changeset
333
anatofuz
parents:
diff changeset
334 **Footnotes**
anatofuz
parents:
diff changeset
335
anatofuz
parents:
diff changeset
336 .. [*] Other names and brands may be claimed as the property of others.