File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,10 +239,9 @@ jobs:
239239 run : |
240240 brew install coreutils
241241
242- # TODO: avoid duplicating compiler flags from Makefile
243242 - name : Check syntax with NONNEG
244243 run : |
245- ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-sign-compare -Wno-multichar -Woverloaded-virtual -fsyntax-only -std=c++11 -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
244+ make check-nonneg
246245
247246 build_cmake_boost :
248247
Original file line number Diff line number Diff line change @@ -453,6 +453,9 @@ checkCWEEntries: /tmp/errorlist.xml
453453.PHONY : validateRules
454454validateRules :
455455 xmllint --noout rules/* .xml
456+ .PHONY : check-nonneg
457+ check-nonneg :
458+ ls lib/* .cpp | xargs -n 1 -P $$(nproc ) g++ -fsyntax-only -DNONNEG $(CXXFLAGS ) $(INCLUDE_FOR_LIB )
456459
457460# ##### Build
458461
Original file line number Diff line number Diff line change @@ -867,6 +867,10 @@ int main(int argc, char **argv)
867867 fout << " .PHONY: validateRules\n " ;
868868 fout << " validateRules:\n " ;
869869 fout << " \t xmllint --noout rules/*.xml\n " ;
870+ fout << " .PHONY: check-nonneg\n " ;
871+ fout << " check-nonneg:\n " ;
872+ // TODO: how to use provided number of jobs?
873+ fout << " \t ls lib/*.cpp | xargs -n 1 -P $$(nproc) g++ -fsyntax-only -DNONNEG $(CXXFLAGS) $(INCLUDE_FOR_LIB)\n " ;
870874
871875 fout << " \n ###### Build\n\n " ;
872876
You can’t perform that action at this time.
0 commit comments