diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-10-31 18:01:48 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-10-31 18:01:48 -0700 |
| commit | ffd1f503603f764455802a569a11406018a264f0 (patch) | |
| tree | 8ad0af8a7a33562bdd45eef03ee04d2b38d42358 /CMakeLists.txt | |
| parent | 1d72edd132b348de0e66c08c6df895043ba34981 (diff) | |
| download | nng-ffd1f503603f764455802a569a11406018a264f0.tar.gz nng-ffd1f503603f764455802a569a11406018a264f0.tar.bz2 nng-ffd1f503603f764455802a569a11406018a264f0.zip | |
fixes #767 Want tunable stack size
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 52421a0b..cf697a3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,11 +108,25 @@ option (NNG_ENABLE_COVERAGE "Enable coverage reporting." OFF) # Enable access to private APIs for our own use. add_definitions (-DNNG_PRIVATE) +# We can use rlimit to configure the stack size for systems +# that have too small defaults. This is not used for Windows, +# which can grow thread stacks sensibly. (Note that NNG can get +# by with a smallish stack, but application callbacks might require +# larger values if using aio completion callbacks.) +if (NOT WIN32) + option (NNG_SETSTACKSIZE "Use rlimit for thread stack size" OFF) + if (NNG_SETSTACKSIZE) + add_definitions(-DNNG_SETSTACKSIZE) + endif() + mark_as_advanced(NNG_SETSTACKSIZE) +endif() + + option (NNG_ENABLE_TLS "Enable TLS protocol (requires mbedTLS" OFF) if (NNG_ENABLE_TLS) add_definitions(-DNNG_SUPP_TLS) set(NNG_SUPP_TLS ON) - endif() +endif() option (NNG_ENABLE_HTTP "Enable HTTP API" ON) if (NNG_ENABLE_HTTP) |
