summaryrefslogtreecommitdiff
path: root/science/dimod/files/patch-testscpp_Makefile
blob: 561e51f67e75a6025e4466884d799f597f99f4ba (plain) (blame)
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
--- testscpp/Makefile.orig	2022-10-05 22:19:20 UTC
+++ testscpp/Makefile
@@ -2,7 +2,7 @@ ROOT := ..
 SRC := $(ROOT)/dimod/include/
 CATCH2 := $(ROOT)/testscpp/Catch2/single_include/
 
-all: catch2 test_main tests
+all: test_main tests
 
 coverage:
 	$(CXX) -std=c++11 -Wall -c test_main.cpp -I $(CATCH2) --coverage -fno-inline -fno-inline-small-functions -fno-default-inline
@@ -14,12 +14,12 @@ coverage:
 	rm baseline.info test.info
 	lcov --remove coverage.info '/usr/*' --output-file coverage.info
 
-tests: test_main.out
+tests: test_main
 	./test_main 
 
 test_main: test_main.cpp
-	$(CXX) -std=c++11 -Wall -Werror -c test_main.cpp -I $(CATCH2) 
-	$(CXX) -std=c++11 -Wall -Werror test_main.o tests/*.cpp -o test_main -I $(SRC) -I $(CATCH2) 
+	$(CXX) -std=c++11 `pkg-config --cflags catch2` -Wall -Werror -c test_main.cpp -I $(CATCH2) 
+	$(CXX) -std=c++11 `pkg-config --cflags catch2` -Wall -Werror test_main.o tests/*.cpp -o test_main -I $(SRC) -I $(CATCH2) 
 
 catch2:
 	git submodule init