Enhancements

Fix dependency bug for compiling on some platforms.
Add specifying port via environment variable.
Add BacktoCN.list extracted from ConnersHua's original BakctoCN configuration.
This commit is contained in:
Tindy X committed 2020-01-07 11:39:18 +08:00
1 parent 6a61f29cf2
commit d1bf8a13f2
5 files changed
+109 -3

No files matched your search

+13 -1
View File
@@ -10,9 +10,21 @@ ADD_DEFINITIONS(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result)
OPTION(USING_STD_REGEX "Use std::regex from C++ library instead of PCRECPP." OFF)
OPTION(USING_MALLOC_TRIM "Call malloc_trim after processing request to lower memory usage (Your system must support malloc_trim)." OFF)
IF(MACOS)
INCLUDE(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES(
"
#include<string>
int main(){std::to_string(0);return 0;}
" HAVE_TO_STRING)
IF(APPLE)
ADD_DEFINITIONS(-D_MACOS)
ENDIF()
IF(HAVE_TO_STRING)
ADD_DEFINITIONS(-DHAVE_TO_STRING)
ENDIF()
IF(USING_MALLOC_TRIM)
ADD_DEFINITIONS(-DMALLOC_TRIM)
ENDIF()