blob: 2cf019a36751d7da7d911abfbe8a480b53e86694 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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")
|