introduce string_view

This commit is contained in:
Chunting Gu
2021-06-17 18:58:53 +08:00
parent 751a3539ae
commit 26bb6b341a
38 changed files with 404 additions and 344 deletions
+3 -2
View File
@@ -31,7 +31,8 @@ set(WEBCC_ENABLE_GZIP 0 CACHE STRING "Enable gzip compression (need Zlib)? (1:Ye
set(WEBCC_LOG_LEVEL 2 CACHE STRING "Log level (0:VERB, 1:INFO, 2:USER, 3:WARN or 4:ERRO)")
set(WEBCC_USE_STD_FILESYSTEM 1 CACHE STRING "Use C++17 filesystem? (1:Yes, 0:No)")
set(WEBCC_USE_STD_FILESYSTEM 1 CACHE STRING "Use std::filesystem? (1:Yes, 0:No)")
set(WEBCC_USE_STD_STRING_VIEW 1 CACHE STRING "Use std::string_view? (1:Yes, 0:No)")
if(BUILD_UNITTEST)
enable_testing()
@@ -45,7 +46,7 @@ endif()
# C++ standard requirements.
if(WEBCC_USE_STD_FILESYSTEM)
if(WEBCC_USE_STD_FILESYSTEM OR WEBCC_USE_STD_STRING_VIEW)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 11)