mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
cmake: trying to run cppcheck with cmake options
This commit is contained in:
parent
e895d1479c
commit
838675f7dc
1 changed files with 10 additions and 0 deletions
|
@ -133,6 +133,7 @@ cmake_dependent_option(WITH_SRC "Build executables"
|
|||
cmake_dependent_option(WITH_FPGA "Build with support for VILLASfpga" ON "XIL_FOUND" OFF)
|
||||
cmake_dependent_option(WITH_TOOLS "Build auxilary tools" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_TESTS "Run tests" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_CPPCHECK "Run cppcheck" OFF "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_PLUGINS "Build plugins" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_CLIENTS "Build client applications" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_DOC "Build documentation" ON "TOPLEVEL_PROJECT" OFF)
|
||||
|
@ -173,6 +174,15 @@ include(cmake/config/Profiling.cmake)
|
|||
# Get version info and buildid from Git
|
||||
GetVersion(${PROJECT_SOURCE_DIR} "CMAKE_PROJECT")
|
||||
|
||||
if(WITH_CPPCHECK)
|
||||
find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
|
||||
if (CMAKE_CXX_CPPCHECK)
|
||||
list(APPEND CMAKE_CXX_CPPCHECK
|
||||
"-D__x86_64__"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(etc)
|
||||
add_subdirectory(lib)
|
||||
|
|
Loading…
Add table
Reference in a new issue