Lodhart
Lodhart

Reputation: 225

Trying to pass too many includes to QA-C fail

I have a problem to add a source file to my QAC configuration. After many tries, I found out that the problem is with too many includes defined as an argument while calling QAC. If I will reduce the number of includes the QAC configuration will pass.

I tried this over the makefile:

@for f in $(filter-out $(QAC_EXCLUDE_FILES),$(QAC_SRC)); do \
    echo "  - $$f" 1>&2; \
    $(QAC) admin -P $(QAC_DIR) -a -- $(QAC_DEF) $(QAC_D_PROJ) $(QAC_INC) $$f >/dev/null; \
done

I also tried to run a single command to add just one file in Command Prompt:

D:/Tools/PRQA_Framework_2.4.0/common/bin/qacli.exe admin -P D:/Output/qac -a -- -Itoo -Imany -Iincludes D:/Src/import.c

I'm pretty sure that the whole command line is not exceeding the limit 8191 characters (it is something about 5500 characters).

I'm using our common company QAC configuration like many of my colleagues without any problem. In the last few days I just add some new includes.

The result is always the same:

But again, if I will just reduce the includes, everything goes nice and smooth.

Also, I would not say it is a problem of CMD because I'm using the same list of includes for my build process without any problem! It is only a problem for QAC.

My setup is Windows 10, MSYS2 tools.

Upvotes: 0

Views: 288

Answers (1)

Lodhart
Lodhart

Reputation: 225

At the and I contact the QAC support and better way how to provide all information to QAC is to generate list file (one line = line source file) with all defines and includes. This way is also much quicker than passing source files one by one.

So the file list qac_sources.txt (generated by makefile) may look like this:

D:/Project/a1.c -D__far_func=  -IToo -Imany -Iincludes
D:/Project/a2.c -D__far_func=  -IToo -Imany -Iincludes
D:/Project/a3.c -D__far_func=  -IToo -Imany -Iincludes
D:/Project/a4.c -D__far_func=  -IToo -Imany -Iincludes

And:

D:/Tools/qacli.exe admin -P D:/Project/Output/qac -F D:/Project/Output/qac/qac_sources.txt

Hope this will help somebody.

Upvotes: 0

Related Questions