From 98aa628f0b1ceb04f0d0ac63fc96df57c7c5f76b Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 27 Apr 2020 08:39:56 -0400 Subject: Makefiles: Scan Objective C/C++ preprocessor dependencies Fixes: #20635 --- Source/cmLocalUnixMakefileGenerator3.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 919fb74..6f2183d 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1457,7 +1457,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( // Create the scanner for this language std::unique_ptr scanner; if (lang == "C" || lang == "CXX" || lang == "RC" || lang == "ASM" || - lang == "CUDA") { + lang == "OBJC" || lang == "OBJCXX" || lang == "CUDA") { // TODO: Handle RC (resource files) dependencies correctly. scanner = cm::make_unique(this, targetDir, lang, &validDeps); } -- cgit v0.12 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