makefile - Treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated -


this similar warning: treating 'c-header' input 'c++-header' when in c++ mode, behavior deprecated. however, op trying compile header files. in case, i'm trying generate dependencies:

$ git diff diff --git a/gnumakefile b/gnumakefile index 791ef05..ce48a59 100644 --- a/gnumakefile +++ b/gnumakefile @@ -175,6 +176,11 @@ libimportobjs = $(libobjs:.o=.import.o)  testimportobjs = $(testobjs:.o=.import.o)  dlltestobjs = dlltest.dllonly.o  +-include gnumakefile.deps + +gnumakefile.deps: +       $(cxx) $(cxxflags) -mm *.h *.cpp > gnumakefile.deps + 

how use cxx build dependencies while avoiding clang warning?

the -mm option of c++ compiler give list of dependencies input file. assuming compile .cpp files (and don't $(cxx) -c xyz.h or such) , dependencies needed .cpp files. changing to:

 $(cxx) $(cxxflags) -mm *.cpp > gnumakefile.deps 

should give dependencies need in gnumakefile.deps.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -