2009-12-12 19:38:49 +01:00
|
|
|
# Minimal CMake build file to build static cppcheck library
|
|
|
|
# This static library is used to build executables:
|
|
|
|
# - cli
|
2009-12-20 09:45:57 +01:00
|
|
|
# - tests
|
|
|
|
# - Qt GUI
|
2009-12-12 19:38:49 +01:00
|
|
|
|
2010-01-03 20:08:49 +01:00
|
|
|
SET(CHECKLIB_HDRS
|
|
|
|
check.h
|
|
|
|
checkautovariables.h
|
|
|
|
checkbufferoverrun.h
|
|
|
|
checkclass.h
|
|
|
|
checkdangerousfunctions.h
|
|
|
|
checkexceptionsafety.h
|
|
|
|
checkheaders.h
|
|
|
|
checkmemoryleak.h
|
|
|
|
checkother.h
|
|
|
|
checkstl.h
|
|
|
|
checkunusedfunctions.h
|
|
|
|
classinfo.h
|
|
|
|
cppcheck.h
|
|
|
|
errorlogger.h
|
|
|
|
executionpath.h
|
|
|
|
filelister.h
|
|
|
|
mathlib.h
|
|
|
|
preprocessor.h
|
|
|
|
settings.h
|
|
|
|
token.h
|
|
|
|
tokenize.h
|
|
|
|
)
|
|
|
|
|
2009-12-12 19:38:49 +01:00
|
|
|
SET(CHECKLIB_SRCS
|
|
|
|
checkautovariables.cpp
|
|
|
|
checkbufferoverrun.cpp
|
|
|
|
checkclass.cpp
|
|
|
|
checkdangerousfunctions.cpp
|
|
|
|
checkexceptionsafety.cpp
|
|
|
|
checkheaders.cpp
|
2009-12-17 19:16:28 +01:00
|
|
|
checkmemoryleak.cpp
|
|
|
|
checkother.cpp
|
|
|
|
checkstl.cpp
|
|
|
|
checkunusedfunctions.cpp
|
|
|
|
cppcheck.cpp
|
2009-12-12 19:38:49 +01:00
|
|
|
errorlogger.cpp
|
2009-12-17 19:19:55 +01:00
|
|
|
executionpath.cpp
|
2009-12-17 19:16:28 +01:00
|
|
|
filelister.cpp
|
|
|
|
mathlib.cpp
|
|
|
|
preprocessor.cpp
|
|
|
|
settings.cpp
|
|
|
|
token.cpp
|
2009-12-12 19:38:49 +01:00
|
|
|
tokenize.cpp
|
|
|
|
)
|
|
|
|
|
2009-12-20 09:45:57 +01:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
set(CMAKE_CXX_FLAGS
|
|
|
|
${CMAKE_CXX_FLAGS}
|
|
|
|
"-Wall -Wextra -pedantic"
|
|
|
|
)
|
|
|
|
endif (CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
2010-01-03 20:08:49 +01:00
|
|
|
ADD_LIBRARY(checklib STATIC ${CHECKLIB_SRCS} ${CHECKLIB_HDRS})
|
2009-12-12 19:38:49 +01:00
|
|
|
|