Skip to content

Commit

Permalink
chore: make integration tests compile for me
Browse files Browse the repository at this point in the history
this is on arch, on 2023-11-26. Abseil now requires C++17,
and there's some weird incompatibility between it adn the distro
provided libprotobuf.so (hence additional linker options to fix that,
see clementine-player/Clementine#7272)
  • Loading branch information
c-cube committed Nov 27, 2023
1 parent 1e29466 commit a4bc147
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ export CXX
ifndef CPPFLAGS
CPPFLAGS =
endif
CPPFLAGS+=-Wno-deprecated -std=c++11
CPPFLAGS+=-Wno-deprecated -std=c++17
export CPPFLAGS

LDFLAGS+=-Wl,--copy-dt-needed-entries
export LDFLAGS

#
# Unit tests
# ----------
Expand Down Expand Up @@ -40,7 +43,7 @@ $(OCAMLOPTIONS_HINC)/ocamloptions.pb.cc: $(OCAMLOPTIONS_HINC)/ocamloptions.proto
$(PROTOC) --cpp_out ./ -I ./ -I $(abspath $(PB_HINC)) ocamloptions.proto

%_cpp.tsk: %_cpp.cpp %.pb.cc $(OCAMLOPTIONS_HINC)/ocamloptions.pb.cc
$(CXX) $(CPPFLAGS) \
$(CXX) $(CPPFLAGS) $(LDFLAGS) \
-I ./ -I $(INTEGRATION_TESTS_DIR) -I $(OCAMLOPTIONS_HINC) -I $(PB_HINC) \
-L $(PB_LINC) -l protobuf \
$? \
Expand All @@ -50,7 +53,7 @@ $(INTEGRATION_TESTS_DIR)/test10_cpp.tsk: \
$(INTEGRATION_TESTS_DIR)/test10_cpp.cpp \
$(INTEGRATION_TESTS_DIR)/test10.pb.cc \
$(INTEGRATION_TESTS_DIR)/test09.pb.cc
$(CXX) $(CPPFLAGS) \
$(CXX) $(CPPFLAGS) $(LDFLAGS) \
-I ./ -I $(INTEGRATION_TESTS_DIR) -I $(PB_HINC) \
-L $(PB_LINC) -l protobuf \
$? \
Expand Down Expand Up @@ -92,7 +95,7 @@ yojson:
$(YOJSON_DIR)/yojson_unittest.proto
$(OCB) $(OCB_YOJSON) -I $(YOJSON_DIR) yojson_unittest_ml.byte
$(CXX) \
$(CPPFLAGS) \
$(CPPFLAGS) $(LDFLAGS) \
-I ./ -I $(INTEGRATION_TESTS_DIR) -I $(OCAMLOPTIONS_HINC) -I $(PB_HINC) \
$(YOJSON_DIR)/yojson_unittest_cpp.cpp $(YOJSON_DIR)/yojson_unittest.pb.cc \
-L $(PB_LINC) \
Expand Down

0 comments on commit a4bc147

Please sign in to comment.