Skip to content

Instantly share code, notes, and snippets.

@LukasWoodtli
Created October 7, 2021 12:53
Show Gist options
  • Save LukasWoodtli/5e23acb64656bff07e85e1bed320dfb4 to your computer and use it in GitHub Desktop.
Save LukasWoodtli/5e23acb64656bff07e85e1bed320dfb4 to your computer and use it in GitHub Desktop.
option(ENABLE_CPPCHECK "Enable cppcheck" OFF)
if(ENABLE_CPPCHECK)
find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
list(APPEND CMAKE_CXX_CPPCHECK
"--language=c++"
"--enable=warning,missingInclude"
"--inconclusive"
"--force"
"--inline-suppr")
message(STATUS "cppcheck enabled")
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment