|
25 | 25 |
|
26 | 26 | # Options processed here internally, not passed to cmake
|
27 | 27 | set internal_options {
|
28 |
| - with-compiler-prefix=<prefix> "set C/C++ toolchains <prefix>gcc and <prefix>g++" |
29 |
| - with-compiler-type=<name> "compiler type: gcc(default), cc, others simply add ++ for C++" |
30 |
| - with-srt-name=<name> "Override srt library name" |
31 |
| - with-haicrypt-name=<name> "Override haicrypt library name (if compiled separately)" |
| 28 | + with-compiler-prefix=<prefix> "set C/C++ toolchains <prefix>gcc and <prefix>g++" |
| 29 | + with-compiler-type=<name> "compiler type: gcc(default), cc, others simply add ++ for C++" |
| 30 | + with-srt-name=<name> "Override srt library name" |
| 31 | + with-haicrypt-name=<name> "Override haicrypt library name (if compiled separately)" |
| 32 | + with-atomic=<spec> "Select implementation for atomics (compiler-intrinsics or sync-mutex)" |
32 | 33 | }
|
33 | 34 |
|
34 | 35 | # Options that refer directly to variables used in CMakeLists.txt
|
35 | 36 | set cmake_options {
|
36 | 37 | cygwin-use-posix "Should the POSIX API be used for cygwin. Ignored if the system isn't cygwin. (default: OFF)"
|
37 |
| - enable-encryption "Should encryption features be enabled (default: ON)" |
38 |
| - enable-c++11 "Should the c++11 parts (srt-live-transmit) be enabled (default: ON)" |
| 38 | + enable-c++11 "Should the c++11 parts (srt-live-transmit) be enabled (default: ON, with gcc < 4.7 OFF)" |
39 | 39 | enable-apps "Should the Support Applications be Built? (default: ON)"
|
| 40 | + enable-bonding "Enable 'bonding' SRT feature (default: OFF)" |
40 | 41 | enable-testing "Should developer testing applications be built (default: OFF)"
|
41 |
| - enable-c++-deps "Extra library dependencies in srt.pc for C language (default: OFF)" |
42 |
| - enable-heavy-logging "Should heavy debug logging be enabled (default: OFF)" |
| 42 | + enable-profile "Should instrument the code for profiling. Ignored for non-GNU compiler. (default: OFF)" |
43 | 43 | enable-logging "Should logging be enabled (default: ON)"
|
44 |
| - enable-debug=<0,1,2> "Enable debug mode (0=disabled, 1=debug, 2=rel-with-debug)" |
| 44 | + enable-heavy-logging "Should heavy debug logging be enabled (default: OFF)" |
45 | 45 | enable-haicrypt-logging "Should logging in haicrypt be enabled (default: OFF)"
|
46 |
| - enable-inet-pton "Set to OFF to prevent usage of inet_pton when building against modern SDKs (default: ON)" |
47 |
| - enable-code-coverage "Enable code coverage reporting (default: OFF)" |
48 |
| - enable-monotonic-clock "Enforced clock_gettime with monotonic clock on GC CV /temporary fix for #729/ (default: OFF)" |
49 |
| - enable-profile "Should instrument the code for profiling. Ignored for non-GNU compiler. (default: OFF)" |
50 |
| - enable-relative-libpath "Should applications contain relative library paths, like ../lib (default: OFF)" |
51 | 46 | enable-shared "Should libsrt be built as a shared library (default: ON)"
|
52 | 47 | enable-static "Should libsrt be built as a static library (default: ON)"
|
53 |
| - enable-suflip "Should suflip tool be built (default: OFF)" |
| 48 | + enable-relative-libpath "Should applications contain relative library paths, like ../lib (default: OFF)" |
54 | 49 | enable-getnameinfo "In-logs sockaddr-to-string should do rev-dns (default: OFF)"
|
55 |
| - enable-unittests "Enable unit tests (default: OFF)" |
| 50 | + enable-unittests "Enable Unit Tests (will download Google UT) (default: OFF)" |
| 51 | + enable-encryption "Should encryption features be enabled (default: ON)" |
| 52 | + enable-c++-deps "Extra library dependencies in srt.pc for C language (default: ON)" |
| 53 | + use-static-libstdc++ "Should use static rather than shared libstdc++ (default: OFF)" |
| 54 | + enable-inet-pton "Set to OFF to prevent usage of inet_pton when building against modern SDKs (default: ON)" |
| 55 | + enable-code-coverage "Enable code coverage reporting (default: OFF)" |
| 56 | + enable-monotonic-clock "Enforced clock_gettime with monotonic clock on GC CV /temporary fix for #729/ (default: OFF)" |
56 | 57 | enable-thread-check "Enable #include <threadcheck.h> that implements THREAD_* macros"
|
57 |
| - enable-experimental-bonding "Enable experimental bonding (default: OFF)" |
58 |
| - openssl-crypto-library=<filepath> "Path to a library." |
59 |
| - openssl-include-dir=<path> "Path to a file." |
60 |
| - openssl-ssl-library=<filepath> "Path to a library." |
61 |
| - pkg-config-executable=<filepath> "pkg-config executable" |
62 |
| - pthread-include-dir=<path> "Path to a file." |
63 |
| - pthread-library=<filepath> "Path to a library." |
| 58 | + enable-stdc++-sync "Use standard C++11 chrono/threads instead of pthread wrapper (default: OFF, on Windows: ON)" |
| 59 | + use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)" |
64 | 60 | use-busy-waiting "Enable more accurate sending times at a cost of potentially higher CPU load (default: OFF)"
|
65 | 61 | use-gnustl "Get c++ library/headers from the gnustl.pc"
|
| 62 | + enable-sock-cloexec "Enable setting SOCK_CLOEXEC on a socket (default: ON)" |
| 63 | + enable-show-project-config "Enables use of ShowProjectConfig() in cmake (default: OFF)" |
| 64 | + enable-new-rcvbuffer "Enables the new receiver buffer implementation (default: ON)" |
| 65 | + enable-clang-tsa "Enable Clang's Thread-Safety-Analysis (default: OFF)" |
| 66 | + atomic-use-srt-sync-mutex "Use mutex to implement atomics (alias: --with-atomic=sync-mutex) (default: OFF)" |
| 67 | + |
66 | 68 | use-enclib "Encryption library to be used: openssl(default), gnutls, mbedtls"
|
67 |
| - use-gnutls "DEPRECATED. Use USE_ENCLIB=openssl|gnutls|mbedtls instead" |
68 |
| - use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)" |
69 |
| - use-static-libstdc++ "Should use static rather than shared libstdc++ (default: OFF)" |
| 69 | + enable-debug=<0,1,2> "Enable debug mode (0=disabled, 1=debug, 2=rel-with-debug)" |
| 70 | + pkg-config-executable=<filepath> "pkg-config executable" |
| 71 | + openssl-crypto-library=<filepath> "OpenSSL: Path to a libcrypto library." |
| 72 | + openssl-include-dir=<path> "OpenSSL: Path to includes." |
| 73 | + openssl-ssl-library=<filepath> "OpenSSL: Path to a libssl library." |
| 74 | + pthread-include-dir=<path> "PThread: Path to includes" |
| 75 | + pthread-library=<filepath> "PThread: Path to the pthread library." |
70 | 76 | }
|
71 | 77 |
|
72 | 78 | set options $internal_options$cmake_options
|
@@ -163,6 +169,24 @@ proc preprocess {} {
|
163 | 169 | set ::haicrypt_name $::optval(--with-haicrypt-name)
|
164 | 170 | unset ::optval(--with-haicrypt-name)
|
165 | 171 | }
|
| 172 | + |
| 173 | + if { "--with-atomic" in $::optkeys } { |
| 174 | + switch -- $::optval(--with-atomic) { |
| 175 | + compiler-intrinsics { |
| 176 | + } |
| 177 | + |
| 178 | + sync-mutex { |
| 179 | + set ::optval(--atomic-use-srt-sync-mutex) 1 |
| 180 | + } |
| 181 | + |
| 182 | + default { |
| 183 | + puts "ERROR: --with-atomic option accepts two values: compiler-intrinsics (default) or sync-mutex" |
| 184 | + exit 1 |
| 185 | + } |
| 186 | + } |
| 187 | + |
| 188 | + unset ::optval(--with-atomic) |
| 189 | + } |
166 | 190 | }
|
167 | 191 |
|
168 | 192 | proc GetCompilerCommand {} {
|
|
0 commit comments