freebsd-ports/science/dwave-preprocessing/files/patch-testscpp_Makefile

32 lines
1.3 KiB
Text

--- testscpp/Makefile.orig 2022-05-07 23:28:35 UTC
+++ testscpp/Makefile
@@ -1,22 +1,22 @@
ROOT := ../
SRC := $(ROOT)/dwave/preprocessing/
-DIMOD := $(shell python -c 'import dimod; print(dimod.get_include())')
+#DIMOD := $(shell python -c 'import dimod; print(dimod.get_include())')
all: catch2 test_main test_main_parallel tests tests_parallel
-tests: test_main.out
+tests: test_main
./test_main
-tests_parallel: test_main_parallel.out
+tests_parallel: test_main_parallel
./test_main_parallel
test_main: test_main.cpp
- g++ -std=c++11 -Wall -c test_main.cpp
- g++ -std=c++11 -Wall test_main.o tests/*.cpp -o test_main -I $(SRC)/include/ -I $(DIMOD)
+ ${CXX} `pkg-config --cflags catch2` -std=c++11 -Wall -c test_main.cpp
+ ${CXX} `pkg-config --cflags catch2` -std=c++11 -Wall test_main.o tests/*.cpp -o test_main -I $(SRC)/include/ -I $(DIMOD)
test_main_parallel: test_main.cpp
- g++ -std=c++11 -fopenmp -Wall -c test_main.cpp -o test_main_parallel.o
- g++ -std=c++11 -fopenmp -Wall test_main_parallel.o tests/*.cpp -o test_main_parallel -I $(SRC)/include/ -I $(DIMOD)
+ ${CXX} `pkg-config --cflags catch2` -std=c++11 -fopenmp -Wall -c test_main.cpp -o test_main_parallel.o
+ ${CXX} `pkg-config --cflags catch2` -std=c++11 -fopenmp -Wall test_main_parallel.o tests/*.cpp -o test_main_parallel -I $(SRC)/include/ -I $(DIMOD)
catch2:
git submodule init