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:
parent
267c8e1620
commit
c1ad435668
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user