Fri, 07 Jul 2023 17:59:52 +0200
add overridable macros to the install docs
1 ---
2 title: Build Instructions
3 ---
5 The build processes uses CMake starting with UCX 3.0.
6 First, download the source code from [Source Forge][1].
8 wget https://sourceforge.net/projects/ucx/files/ucx-latest.tar.gz
9 tar -xzf ucx-latest.tar.gz
10 cd ucx-latest
12 Then create a build directory and use cmake to create the build files,
13 execute the build, and - optionally - install the files.
15 mkdir build
16 cd build
17 cmake ..
18 cmake --build .
19 sudo cmake --install .
21 When compiling UCX 3, you can tweak the buffer sizes for small-buffer-optimization.
22 You can do this, be pre-defining one or more of the following macros:
24 --------------------------------- --------------------------------------------------------------------- ----------
25 Macro Description Default
26 --------------------------------- --------------------------------------------------------------------- ----------
27 CX_ARRAY_SWAP_SBO_SIZE The maximum item size in an array list that uses SBO. 128
29 CX_LINKED_LIST_SORT_SBO_SIZE The maximum list size that uses SBO during sort. 1024
31 CX_LINKED_LIST_SWAP_SBO_SIZE The maximum item size that uses SBO swap instead of relinking. 128
33 CX_PRINTF_SBO_SIZE The maximum string length printf.h uses stack memory for. 512
35 CX_STRSTR_SBO_SIZE The maximum length of the "needle" in strstr that can use SBO. 512
36 --------------------------------- --------------------------------------------------------------------- ----------
38 You can also tweak some other buffer sizes with the same technique:
40 --------------------------------- --------------------------------------------------- ----------
41 Macro Description Default
42 --------------------------------- --------------------------------------------------- ----------
43 CX_STRREPLACE_INDEX_BUFFER_SIZE The number of matches one index buffer can store. 64
45 CX_STREAM_COPY_BUF_SIZE The buffer size on the stack for a stream copy. 1024
47 CX_STREAM_BCOPY_BUF_SIZE The buffer size on the heap for a stream copy. 8192
48 --------------------------------- --------------------------------------------------- ----------
50 ---
52 ### UCX 2.1
54 The build procedure for UCX 2.1 uses a configure script.
55 For Microsoft Windows, you will need an appropriate port of the linux
56 tools (like MinGW or Cygwin).
57 First, download the source code from [Source Forge][1].
59 wget https://sourceforge.net/projects/ucx/files/ucx-2.1.0.tar.gz
60 tar -xzf ucx-2.1.0.tar.gz
61 cd ucx-2.1.0
63 Then issue the `configure` and `make` commands.
65 ./configure && make
67 To verify your installment you can issue `make check`. If everything is fine,
68 you can install UCX with
70 make install
72 Note, that you might need administrative privileges for a system wide
73 installation.
75 [1]: https://sourceforge.net/projects/ucx/files/