Would our “-drystdinc” flag work? Assuming all you’re looking for is the default include paths, this may be easier to parse than having to wade through the full post-process file and verbose compiler output.
% /proj/nv/Linux_x86_64/21.3/compilers/bin/nvc --help | grep drystdinc
-drystdinc Display standard include directories and exit
% /proj/nv/Linux_x86_64/21.3/compilers/bin/nvc -drystdinc
/proj/nv/Linux_x86_64/21.3/compilers/include-gcc70:/proj/nv/Linux_x86_64/21.3/compilers/include:/proj/nv/Linux_x86_64/21.3/comm_libs/mpi/include:/usr/lib/gcc/x86_64-linux-gnu/7/include:/usr/local/include:/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed:/usr/include/x86_64-linux-gnu:/usr/include