Tasking: Add default include directories to generated compile commands
When generating a JSON compilation database using CMAKE_EXPORT_COMPILE_COMMANDS, the default include directories are missing from the command objects.
There are some static code analysis tools (such as PRQA) which use the compilation database as an input for their analysis and depend on these paths being listed to be able to open and analyse include files.
Therefore, it would be very useful if these directories were always explicitly added to the generated compile commands whenever a database is created. I believe this should be done in the toolchain file, something like this:
if(CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES ${TASKING_BIN_DIR}/../include)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${TASKING_BIN_DIR}/../include.cxx)
endif()
Edited by Gordon Jess