evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ju / jumanpp / 0001-Exclude-all-tests-from-the-build.patch
blobd41bada82def818011afd8fe3fff5f8cbf63b9a3
1 From c52a5046e19718a43d48c9b3cfdc121d964e8c3b Mon Sep 17 00:00:00 2001
2 From: Maximilian Bosch <maximilian@mbosch.me>
3 Date: Fri, 28 Jan 2022 17:43:35 +0100
4 Subject: [PATCH] Exclude all tests from the build
6 For some reason it isn't sufficient to set `-DJPP_ENABLE_TESTS=OFF`.
7 Doing that because the tests on 2.0.0-rc3 don't seem to be working and
8 the vendored catch2 doesn't build with glibc 2.34.
9 ---
10 src/CMakeLists.txt | 3 +--
11 src/core/CMakeLists.txt | 11 +----------
12 src/core/analysis/CMakeLists.txt | 2 --
13 src/core/codegen/CMakeLists.txt | 3 ---
14 src/core/spec/CMakeLists.txt | 2 --
15 src/core/training/CMakeLists.txt | 2 --
16 src/jumandic/CMakeLists.txt | 8 +-------
17 src/rnn/CMakeLists.txt | 5 +----
18 src/util/CMakeLists.txt | 2 --
19 9 files changed, 4 insertions(+), 34 deletions(-)
21 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
22 index 169dff5..64b6a07 100644
23 --- a/src/CMakeLists.txt
24 +++ b/src/CMakeLists.txt
25 @@ -67,7 +67,6 @@ function(jpp_feature_codegen)
26 endfunction(jpp_feature_codegen)
28 add_subdirectory(util)
29 -add_subdirectory(testing)
30 add_subdirectory(core)
31 add_subdirectory(jumandic)
32 -add_subdirectory(rnn)
33 \ No newline at end of file
34 +add_subdirectory(rnn)
35 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
36 index c63d134..01c825e 100644
37 --- a/src/core/CMakeLists.txt
38 +++ b/src/core/CMakeLists.txt
39 @@ -55,20 +55,11 @@ set(core_hdrs
40 ${core_hdrs}
43 -set(core_test_srcs
44 - ${core_test_srcs}
45 - ${core_tsrcs}
46 - test/test_analyzer_env.h
47 - ../testing/test_analyzer.h
48 - )
50 add_library(jpp_core ${core_srcs} ${core_hdrs} ${libs3p_pegtl_headers})
51 -jpp_test_executable(jpp_core_tests ${core_test_srcs})
53 target_include_directories(jpp_core PUBLIC ${jpp_core_cfg_dir})
55 target_link_libraries(jpp_core PUBLIC jpp_util jpp_rnn PRIVATE pathie)
56 -target_link_libraries(jpp_core_tests jpp_core jpp_core_train)
58 if (${JPP_USE_PROTOBUF})
59 target_include_directories(jpp_core PUBLIC ${Protobuf_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
60 @@ -78,4 +69,4 @@ endif()
61 add_subdirectory(benchmarks)
62 if (${JPP_ENABLE_DEV_TOOLS})
63 add_subdirectory(devtools)
64 -endif ()
65 \ No newline at end of file
66 +endif ()
67 diff --git a/src/core/analysis/CMakeLists.txt b/src/core/analysis/CMakeLists.txt
68 index 526263e..1b32f8d 100644
69 --- a/src/core/analysis/CMakeLists.txt
70 +++ b/src/core/analysis/CMakeLists.txt
71 @@ -79,5 +79,3 @@ jpp_core_files(core_hdrs
75 -jpp_test_executable(jpp_core_analysis_tests ${core_analysis_tsrc})
76 -target_link_libraries(jpp_core_analysis_tests jpp_core)
77 diff --git a/src/core/codegen/CMakeLists.txt b/src/core/codegen/CMakeLists.txt
78 index a905cee..fa759c7 100644
79 --- a/src/core/codegen/CMakeLists.txt
80 +++ b/src/core/codegen/CMakeLists.txt
81 @@ -30,7 +30,4 @@ set(jpp_codegen_tsrcs
83 add_library(jpp_core_codegen ${jpp_codegen_srcs} ${jpp_codegen_hdrs})
85 -jpp_test_executable(jpp_codegen_tests ${jpp_codegen_tsrcs})
86 -target_include_directories(jpp_codegen_tests PRIVATE ${cgtest02_INCLUDE})
87 target_link_libraries(jpp_core_codegen jpp_core)
88 -target_link_libraries(jpp_codegen_tests jpp_core_codegen)
89 \ No newline at end of file
90 diff --git a/src/core/spec/CMakeLists.txt b/src/core/spec/CMakeLists.txt
91 index f495d67..da827b9 100644
92 --- a/src/core/spec/CMakeLists.txt
93 +++ b/src/core/spec/CMakeLists.txt
94 @@ -33,5 +33,3 @@ jpp_core_files(core_hdrs
98 -jpp_test_executable(jpp_core_spec_tests ${core_spec_tsrc} ${libs3p_pegtl_headers})
99 -target_link_libraries(jpp_core_spec_tests jpp_core)
100 \ No newline at end of file
101 diff --git a/src/core/training/CMakeLists.txt b/src/core/training/CMakeLists.txt
102 index 960437e..4ede9e1 100644
103 --- a/src/core/training/CMakeLists.txt
104 +++ b/src/core/training/CMakeLists.txt
105 @@ -39,7 +39,5 @@ set(core_train_hdrs
108 add_library(jpp_core_train ${core_train_src} ${core_train_hdrs})
109 -jpp_test_executable(jpp_core_train_tests ${core_train_tsrc})
111 target_link_libraries(jpp_core_train jpp_core)
112 -target_link_libraries(jpp_core_train_tests jpp_core_train)
113 \ No newline at end of file
114 diff --git a/src/jumandic/CMakeLists.txt b/src/jumandic/CMakeLists.txt
115 index bef3149..85a8b5d 100644
116 --- a/src/jumandic/CMakeLists.txt
117 +++ b/src/jumandic/CMakeLists.txt
118 @@ -53,10 +53,6 @@ if (${JPP_USE_PROTOBUF})
119 endif ()
122 -jpp_test_executable(jpp_jumandic_tests ${jumandic_tests})
123 -jpp_test_executable(jpp_bug_tests ${bug_test_sources})
124 -target_include_directories(jpp_jumandic_tests PRIVATE ${jpp_jumandic_cg_INCLUDE})
126 add_executable(jpp_jumandic_bootstrap main/bootstrap.cc)
127 add_executable(jumanpp_v2 main/jumanpp.cc)
128 add_executable(jumanpp_v2_train main/jumanpp_train.cc main/jumanpp_train.h)
129 @@ -64,11 +60,9 @@ add_executable(jpp_jumandic_pathdiff main/path_diff.cc)
130 target_include_directories(jpp_jumandic_pathdiff PRIVATE ${jpp_jumandic_cg_INCLUDE})
132 target_link_libraries(jpp_jumandic jpp_jumandic_spec)
133 -target_link_libraries(jpp_jumandic_tests jpp_jumandic jpp_core_train)
134 -target_link_libraries(jpp_bug_tests jpp_jumandic jpp_core_train)
135 target_link_libraries(jpp_jumandic_bootstrap jpp_jumandic)
136 target_link_libraries(jumanpp_v2 jpp_jumandic)
137 target_link_libraries(jumanpp_v2_train jpp_jumandic jpp_core_train)
138 target_link_libraries(jpp_jumandic_pathdiff jpp_jumandic)
140 -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jumanpp_v2 RENAME jumanpp DESTINATION bin)
141 \ No newline at end of file
142 +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jumanpp_v2 RENAME jumanpp DESTINATION bin)
143 diff --git a/src/rnn/CMakeLists.txt b/src/rnn/CMakeLists.txt
144 index 448ba51..ca09a00 100644
145 --- a/src/rnn/CMakeLists.txt
146 +++ b/src/rnn/CMakeLists.txt
147 @@ -1,12 +1,9 @@
148 set(jpp_rnn_sources mikolov_rnn.cc)
149 set(jpp_rnn_includes mikolov_rnn.h simple_rnn_impl.h mikolov_rnn_impl.h rnn_arg_parse.h)
150 -set(jpp_rnn_tests mikolov_rnn_test.cc)
152 add_library(jpp_rnn ${jpp_rnn_sources} ${jpp_rnn_includes} )
153 add_library(jumanpp_rnn_legacy legacy/rnnlmlib.h legacy/rnnlmlib_static.h legacy/rnnlmlib_static.cpp)
155 -jpp_test_executable(jpp_rnn_tests ${jpp_rnn_tests})
156 target_link_libraries(jpp_rnn jpp_util)
157 -target_link_libraries(jpp_rnn_tests jpp_rnn jumanpp_rnn_legacy)
159 -target_link_libraries(jumanpp_rnn_legacy jpp_util)
160 \ No newline at end of file
161 +target_link_libraries(jumanpp_rnn_legacy jpp_util)
162 diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
163 index 53b6c57..c4599d5 100644
164 --- a/src/util/CMakeLists.txt
165 +++ b/src/util/CMakeLists.txt
166 @@ -25,8 +25,6 @@ endif()
169 add_library(jpp_util ${jpp_util_sources} ${jpp_util_headers} ${BACKWARD_headers})
170 -jpp_test_executable(jpp_util_test ${jpp_util_test_srcs} ${jpp_util_headers})
171 -target_link_libraries(jpp_util_test jpp_util)
172 target_link_libraries(jpp_util ${CMAKE_THREAD_LIBS_INIT})
173 target_include_directories(jpp_util PUBLIC ${JPP_LIBS_DIR} ${JPP_SRC_DIR})
174 target_compile_features(jpp_util PUBLIC
176 2.33.1