-
Notifications
You must be signed in to change notification settings - Fork 33
/
opencc_patch
62 lines (55 loc) · 1.8 KB
/
opencc_patch
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1acb75a..b9b49da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,12 +152,23 @@ add_definitions(
-DPACKAGE_NAME="${PACKAGE_NAME}"
)
+# Reproducible build
+add_definitions(-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.)
+
+if (EMSCRIPTEN)
+ add_definitions(-I"${CMAKE_CURRENT_SOURCE_DIR}/../../../build/sysroot/usr/include")
+else()
+ add_definitions(-I"${CMAKE_CURRENT_SOURCE_DIR}/../../include")
+endif()
+
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
add_definitions(
-std=c++14
-Wall
)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+ if (NOT EMSCRIPTEN)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+ endif ()
if (CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-O0 -g3)
endif ()
@@ -221,9 +232,6 @@ endif()
######## Subdirectories
add_subdirectory(src)
-add_subdirectory(doc)
-add_subdirectory(data)
-add_subdirectory(test)
######## Testing
diff --git a/deps/rapidjson-1.1.0/rapidjson/document.h b/deps/rapidjson-1.1.0/rapidjson/document.h
index e3e20df..ad362a6 100644
--- a/deps/rapidjson-1.1.0/rapidjson/document.h
+++ b/deps/rapidjson-1.1.0/rapidjson/document.h
@@ -322,7 +322,7 @@ struct GenericStringRef {
operator const Ch *() const { return s; }
const Ch* const s; //!< plain CharType pointer
- const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
+ SizeType length; //!< length of the string (excluding the trailing NULL terminator)
private:
//! Disallow construction from non-const array
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 75eda02..c7bb8c5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -204,5 +204,3 @@ if (ENABLE_BENCHMARK)
endif()
# Subdir
-
-add_subdirectory(tools)