sanitycheck: export compile commands on --cmake-only

export compile commands when running with --cmake-only, this can be used
for analysis and coverage statistics.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-11-30 10:15:23 -05:00 committed by Kumar Gala
commit d91f993e66

View file

@ -1841,6 +1841,9 @@ class CMake():
'-G{}'.format(get_generator()[1])
]
if options.cmake_only:
cmake_args.append("-DCMAKE_EXPORT_COMPILE_COMMANDS=1")
args = ["-D{}".format(a.replace('"', '')) for a in args]
cmake_args.extend(args)