Upstream fixed marisa 0.3.0 support by using C++17: https://github.com/BYVoid/OpenCC/commit/2e9eb53c5e7124ee93ee2cb2225d839f99e4f7ed Adjusted for 1.1.7 and 1.1.9, which still pass explicit -std=c++14 flags. --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ include(CPack) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_MACOSX_RPATH 1) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() @@ -154,7 +154,7 @@ add_definitions( if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") add_definitions( - -std=c++14 + -std=c++17 -Wall ) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") @@ -163,7 +163,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") endif () elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") add_definitions( - -std=c++14 + -std=c++17 -Wall ) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")