Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPPFLAGS to dmake Makefile generation #449

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -249,7 +249,7 @@ check: all
./testrunner -g -q

dmake: tools/dmake.o cli/filelister.o lib/path.o
$(CXX) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o lib/path.o -Ilib $(LDFLAGS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o lib/path.o -Ilib $(LDFLAGS)
./dmake

reduce: tools/reduce.o externals/tinyxml/tinyxml2.o $(LIBOBJ)
Expand Down
4 changes: 2 additions & 2 deletions cli/cppcheckexecutor.cpp
Expand Up @@ -695,10 +695,10 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
{
Settings& settings = cppcheck.settings();
_settings = &settings;
bool std = (settings.library.load(argv[0], "std.cfg").errorcode == Library::OK);
bool std = (settings.library.load(argv[0], "std.cfg").errorcode == Library::OK || settings.library.load(argv[0], "cfg/std.cfg").errorcode == Library::OK);
bool posix = true;
if (settings.standards.posix)
posix = (settings.library.load(argv[0], "posix.cfg").errorcode == Library::OK);
posix = (settings.library.load(argv[0], "posix.cfg").errorcode == Library::OK || settings.library.load(argv[0], "cfg/posix.cfg").errorcode == Library::OK );

if (!std || !posix) {
const std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
Expand Down
2 changes: 1 addition & 1 deletion tools/dmake.cpp
Expand Up @@ -399,7 +399,7 @@ int main(int argc, char **argv)
fout << "check:\tall\n";
fout << "\t./testrunner -g -q\n\n";
fout << "dmake:\ttools/dmake.o cli/filelister.o lib/path.o\n";
fout << "\t$(CXX) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o lib/path.o -Ilib $(LDFLAGS)\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o lib/path.o -Ilib $(LDFLAGS)\n";
fout << "\t./dmake\n\n";
fout << "reduce:\ttools/reduce.o externals/tinyxml/tinyxml2.o $(LIBOBJ)\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -g -o reduce tools/reduce.o -Ilib -Iexternals/tinyxml $(LIBOBJ) $(LIBS) externals/tinyxml/tinyxml2.o $(LDFLAGS) $(RDYNAMIC)\n\n";
Expand Down