From c4d09fdc6d563570ef779244751e0088c83ea096 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 27 Apr 2020 08:42:27 -0400 Subject: Makefiles: Add Objective C/C++ compilations to compile_commands.json Fixes: #20634 --- Source/cmMakefileTargetGenerator.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index dd8a389..9d08e07 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -666,8 +666,9 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( // At the moment, it is assumed that C, C++, Fortran, and CUDA have both // assembly and preprocessor capabilities. The same is true for the // ability to export compile commands - bool lang_has_preprocessor = ((lang == "C") || (lang == "CXX") || - (lang == "Fortran") || (lang == "CUDA")); + bool lang_has_preprocessor = + ((lang == "C") || (lang == "CXX") || (lang == "OBJC") || + (lang == "OBJCXX") || (lang == "Fortran") || (lang == "CUDA")); bool const lang_has_assembly = lang_has_preprocessor; bool const lang_can_export_cmds = lang_has_preprocessor; -- cgit v0.12