Menu

Multiple specific configurations

2017-11-17
2017-11-21
  • Daniel Bengtsson

    If I run with --force or --max-configs cppcheck might not check the configurations I am most interested in. If I pass several -D arguments it seems to test them together if I understand it correxctly. Is it possible to test multiple specific configurations without invoking cppcheck more than once?

     
  • Daniel Marjamäki

    Well.. I think you could generate a compile_commands.json .. if it says that file1.c is compiled using 3 different configurations then Cppcheck should check file1.c with those 3 configurations.

    I believe the reason you have problems is that Cppcheck does not extract all the configurations. If you want you could try to create a simplified example and report that in our issue tracker. In the simplified example, no real code should be is needed .. just the preprocessor commands.

     
  • Daniel Bengtsson

    I can try that. The reason I started to look into it was that if I used all configurations there were close to 2000 and it was too slow. And using the limit didn't seem to test the configuration we considered important.

     

Log in to post a comment.