1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Makefile.base: Error for C++ code w/w cpp feature

If external modules use C++ code and forget to require the `cpp` feature,
linking will still take places using $(CC). This commit adds a check if C++ code
was detected without the feature `cpp` being used, now the build is aborted
with a helpful error message rather than a linker error.
This commit is contained in:
Marian Buschsieweke 2020-07-09 21:19:27 +02:00
parent 267c8e1620
commit c1ad435668
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -63,6 +63,12 @@ ifeq ($(strip $(ASSMSRC))$(NO_AUTO_SRC),)
ASSMSRC := $(wildcard *.S)
endif
ifneq (,$(SRCXX))
ifeq (,$(filter cpp,$(FEATURES_USED)))
$(error Found C++ source, but feature "cpp" is not used. Add "FEATURES_REQUIRED += cpp")
endif
endif
# include makefile snippets for packages in $(USEPKG) that modify GENSRC:
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.gensrc)