Coder Social home page Coder Social logo

Comments (1)

StableCoder avatar StableCoder commented on May 29, 2024 1

I had a few emails from people who didn't want to use the options/flags I had used originally, and wanted to have more control via options within their own projects. Thus in 23.09, the tools.cmake items were reworked:

Rework of tools.cmake items. The options of CLANG_TIDY, IWYU and CPPCHECK have been removed. Instead, it is up to the including project on when/how to enable these tools. The ability to 'reset' the tools, to disable them for certain scopes has been accommodated via the use of reset_* macros.

Quite simply, you should be able to add options and put the macro calls of include_what_you_use and cppcheck in an if statement.

To remake the exact behaviour from before for tools.cmake, you can change something like this:

clang_tidy(...)
include_what_you_use(...)
cppcheck(...)

to

option(CLANG_TIDY "Turns on clang-tidy processing if it is found." OFF)
if(CLANG_TIDY)
  clang_tidy(...)
endif()

option(IWYU "Turns on include-what-you-use processing if it is found." OFF)
if(IWYU)
  include_what_you_use(...)
endif()

option(CPPCHECK "Turns on cppcheck processing if it is found." OFF)
if(CPPCHECK)
  cppcheck(...)
endif()

from cmake-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.