mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-19 04:34:36 +03:00
add new cppcheck example with updated dockerfiles
This commit is contained in:
17
04-static-analysis/cppcheck-compile-commands/CMakeLists.txt
Normal file
17
04-static-analysis/cppcheck-compile-commands/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
|
||||
project(cppcheck_analysis)
|
||||
|
||||
# Have cmake create a compile database
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# Add a custom CMake Modules directory
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules
|
||||
${CMAKE_MODULE_PATH})
|
||||
|
||||
# find the cppcheck binary
|
||||
find_package(CppCheck)
|
||||
|
||||
# Add sub directories
|
||||
add_subdirectory(subproject1)
|
||||
add_subdirectory(subproject2)
|
||||
Reference in New Issue
Block a user