From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id A75841F5AE for ; Fri, 4 Jun 2021 18:05:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbhFDSHp (ORCPT ); Fri, 4 Jun 2021 14:07:45 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:33390 "EHLO mail-ed1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbhFDSHp (ORCPT ); Fri, 4 Jun 2021 14:07:45 -0400 Received: by mail-ed1-f45.google.com with SMTP id f5so7136003eds.0 for ; Fri, 04 Jun 2021 11:05:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tx1NcYEo7Sj2HdSS29xzKa9BgncQZ598mAnCjw15qEw=; b=DKHjBGjGeU0USVfYKcYgG31s1gO6+2j0XF/4uNmWfOSKE6/tR1VzGoT9aUz5JDmiQX phtt2jD5NSUugzCesTmT6VK3FyeOfKdFdU/1eJxWro1gGwuKL+FIrhl6b4iEMFFgfzdA T5ltsGGaKPJFM8vC/luIyF6cnlV9Xfd37awsZoNAemnmHQPazi+SaGGhGdBb30c0J/tZ Xv9QNVgSkYCVAHmgjUrU0DJyJYroFKExm7HTJVz6Ns+sCZQ7VfHuuGdlvqa/3ILMv9DJ uHKFedxlsjD3AwWje+XMDDQfKYgNVeBEzoYiwzPCNLrsDwk4zEiNuu/8ZdPM5yTAJir/ ULow== X-Gm-Message-State: AOAM531ULh/ySoJegfyjrlddb588GLDqbESuVjJcYv09VfMpPROJbi6y k3/OMq8SZnZSasHQFwFdLL1U4QxOYFTtEcT9uSQ= X-Google-Smtp-Source: ABdhPJx2Dbt4Jf18YFO8I/neGRQa4hVwiHeJ4goUBA08929IkjjpwxCQiPcAhLRL2+n2Ey8sXKMMO2tFu0WafPAh7Wk= X-Received: by 2002:a05:6402:1777:: with SMTP id da23mr5968239edb.181.1622829955673; Fri, 04 Jun 2021 11:05:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Sunshine Date: Fri, 4 Jun 2021 14:05:44 -0400 Message-ID: Subject: Re: [PATCH 2/3] cmake: create compile_commands.json by default To: Matthew Rogers via GitGitGadget Cc: Git List , Philip Oakley , Sibi Siddharthan , Johannes Schindelin , Danh Doan , Matthew Rogers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Jun 4, 2021 at 1:44 PM Matthew Rogers via GitGitGadget wrote: > Some users have expressed interest in a more "batteries included" way of > building via CMake[1], and a big part of that is providing easier access > to tooling external tools. > > A straightforward way to accomplish this is to make it as simple as > possible is to enable the generation of the compile_commands.json file, > which is supported by many tools such as: clang-tidy, clang-format, > sourcetrail, etc. > > This does come with a small run-time overhead during the configuration > step (~6 seconds on my machine): > [...] > This seems like a small enough price to pay to make the project more > accessible to newer users. Additionally there are other large projects > like llvm [2] which has had this enabled by default for >6 years at the > time of this writing, and no real negative consequences that I can find > with my search-skills. > > NOTE: That the comppile_commands.json is currenntly produced only when > using the Ninja and Makefile generators. See The CMake documentation[3] > for more info. s/comppile/compile/ s/currenntly/currently/ > Signed-off-by: Matthew Rogers