File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1686,6 +1686,31 @@ buildbottest: all
1686
1686
fi
1687
1687
$(TESTRUNNER) -j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS)
1688
1688
1689
+ TEST_CPPMODS= \
1690
+ Modules/_testcpp03ext$(EXT_SUFFIX) \
1691
+ Modules/_testcpp11ext$(EXT_SUFFIX)
1692
+
1693
+ .PHONY: test_cppmods
1694
+ test_cppmods: $(TEST_CPPMODS) pybuilddir.txt
1695
+ @target=`cat pybuilddir.txt`; \
1696
+ $(MKDIR_P) $$target; \
1697
+ for mod in $(TEST_CPPMODS); do \
1698
+ $(LN) -sf ../../$$mod $$target/`basename $$mod`; \
1699
+ done
1700
+
1701
+ # gh-91321: Build a basic C++ test extension to check that the Python C API is
1702
+ # compatible with C++ and does not emit C++ compiler warnings. The purpose of
1703
+ # _testcppext extension is to check that building a C++ extension using the
1704
+ # Python C API does not emit C++ compiler warnings
1705
+ Modules/_testcpp03ext.o: $(srcdir)/Lib/test/_testcppext.cpp $(PYTHON_HEADERS)
1706
+ $(CXX) -Werror -std=c++03 $(CCSHARED) $(PY_CPPFLAGS) $(PY_CFLAGS) -c $(srcdir)/Lib/test/_testcppext.cpp -o $@
1707
+ Modules/_testcpp03ext$(EXT_SUFFIX): Modules/_testcpp03ext.o
1708
+ $(LDCXXSHARED) $< -o $@
1709
+ Modules/_testcpp11ext.o: $(srcdir)/Lib/test/_testcppext.cpp $(PYTHON_HEADERS)
1710
+ $(CXX) -Werror -std=c++11 $(CCSHARED) $(PY_CPPFLAGS) $(PY_CFLAGS) -c $(srcdir)/Lib/test/_testcppext.cpp -o $@
1711
+ Modules/_testcpp11ext$(EXT_SUFFIX): Modules/_testcpp11ext.o
1712
+ $(LDCXXSHARED) $< -o $@
1713
+
1689
1714
pythoninfo: all
1690
1715
$(RUNSHARED) $(HOSTRUNNER) ./$(BUILDPYTHON) -m test.pythoninfo
1691
1716
You can’t perform that action at this time.
0 commit comments