mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 04:14:34 +03:00
18 lines
417 B
CMake
18 lines
417 B
CMake
cmake_minimum_required (VERSION 3.5)
|
|
|
|
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)
|