Skip to content

Commit 78b0dae

Browse files
committed
fix: fix te 3.6 3.7 build , replace the g++ with conda-compilers
1 parent 414eb81 commit 78b0dae

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ python_version_patch := $(word 3,${python_version_full})
66

77
PY_GT_3_8 := $(shell [ $(python_version_major) -gt 3 -o \( $(python_version_major) -eq 3 -a $(python_version_minor) -ge 8 \) ] && echo true)
88

9+
CC=x86_64-linux-gnu-g++
10+
911
PYLIB=$(shell python3-config --ldflags)
1012
PYINC=$(shell python3-config --cflags)
1113
ifeq ($(PY_GT_3_8),true)
@@ -14,20 +16,20 @@ PYINC=$(shell python3-config --cflags --embed )
1416
endif
1517

1618
wrapper:
17-
echo $(PYLIB)git
18-
g++ -Wall -pedantic -Wextra -fPIC -shared -std=c++1y -fvisibility=default -Wno-attributes $(PYINC) -g -O0 -I. -I./include/spdlog/include/ -I./include/ -o libwrapper.so pyWrapper.cpp fswatch.cpp wrapper.cpp -L. -L /opt/conda/envs/loader/lib $(PYLIB) -rdynamic
19+
echo $(PYLIB)
20+
${CC} -Wall -pedantic -Wextra -fPIC -shared -std=c++1y -fvisibility=default -Wno-attributes $(PYINC) -g -O0 -I. -I./include/spdlog/include/ -I./include/ -o libwrapper.so pyWrapper.cpp fswatch.cpp wrapper.cpp -L. -L /opt/conda/envs/loader/lib $(PYLIB) -rdynamic
1921
mkdir -p wrapper_lib
2022
cp libwrapper.so ./wrapper_lib
2123

2224
t:
2325
echo $(python_version_minor)
2426
echo $(PY_GT_3_6)
2527
rm -f test
26-
g++ -Wall -g -O0 -fPIC -I./include/spdlog/include/ $(PYINC) pyWrapper.cpp pyWrapperTest.cpp -o test $(PYLIB)
28+
${CC} -Wall -g -O0 -fPIC -I./include/spdlog/include/ $(PYINC) pyWrapper.cpp pyWrapperTest.cpp -o test $(PYLIB)
2729

2830
main:
2931
echo $(PYLIB)
30-
g++ -Wall -pedantic -Wextra -fPIC -std=c++1y -fvisibility=default -Wno-attributes $(PYINC) -g -O0 -I. -I./include/spdlog/include/ -I./include/ -o output pyWrapper.cpp wrapper.cpp test_data/main.cpp -L. -L /opt/conda/envs/loader/lib $(PYLIB) -rdynamic
32+
${CC} -Wall -pedantic -Wextra -fPIC -std=c++1y -fvisibility=default -Wno-attributes $(PYINC) -g -O0 -I. -I./include/spdlog/include/ -I./include/ -o output pyWrapper.cpp wrapper.cpp test_data/main.cpp -L. -L /opt/conda/envs/loader/lib $(PYLIB) -rdynamic
3133

3234
fswatch:
33-
g++ fswatch.cpp -l pthread -o fs_test
35+
${CC} fswatch.cpp -l pthread -o fs_test

0 commit comments

Comments
 (0)