diff --git a/CMakeLists.txt b/CMakeLists.txt index a26ead6546a..1bf4f4aba04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,10 @@ option (Seastar_EXPERIMENTAL_COROUTINES_TS "Enable experimental support for Coroutines TS." OFF) +option (Seastar_SSTRING + "Use seastar's own string implementation" + ON) + set (Seastar_API_LEVEL "2" CACHE @@ -745,6 +749,10 @@ if (Seastar_EXPERIMENTAL_COROUTINES_TS) target_compile_definitions (seastar PUBLIC SEASTAR_COROUTINES_TS) endif () +if (Seastar_SSTRING) + target_compile_options (seastar PUBLIC -DSEASTAR_SSTRING) +endif () + if (Seastar_GCC6_CONCEPTS OR Concepts_FOUND) target_compile_definitions (seastar PUBLIC SEASTAR_HAVE_GCC6_CONCEPTS) diff --git a/include/seastar/core/sstring.hh b/include/seastar/core/sstring.hh index 69f7f121bd2..479835b7f7f 100644 --- a/include/seastar/core/sstring.hh +++ b/include/seastar/core/sstring.hh @@ -42,7 +42,11 @@ namespace seastar { template class basic_sstring; +#ifdef SEASTAR_SSTRING using sstring = basic_sstring; +#else +using sstring = std::string; +#endif template class basic_sstring {