Add testsuite to CMake build files.

This commit is contained in:
Kimmo Varis 2009-12-14 17:21:32 +02:00
parent c85c0fbabc
commit 6e540e615d
2 changed files with 39 additions and 1 deletions

View File

@ -1,5 +1,8 @@
# Minimal CMake build file
# Builds static library from lib directory and commandline executable
# Builds:
# - static library from lib directory
# - commandline executable
# - test suite
# To build with CMake:
# - install CMake 2.6 or later
@ -12,4 +15,5 @@ PROJECT(CPPCHECK)
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(cli)
ADD_SUBDIRECTORY(test)

34
test/CMakeLists.txt Normal file
View File

@ -0,0 +1,34 @@
# Minimal CMake build file to build cppcheck test suite
SET(CHECKTEST_SRCS
testmemleak.cpp
testother.cpp
testpreprocessor.cpp
testautovariables.cpp
testredundantif.cpp
testbufferoverrun.cpp
testrunner.cpp
testcharvar.cpp
testsimplifytokens.cpp
testclass.cpp
teststl.cpp
testconstructors.cpp
testsuite.cpp
testcppcheck.cpp
testdangerousfunctions.cpp
testtoken.cpp
testdivision.cpp
testtokenize.cpp
testexceptionsafety.cpp
testunusedfunctions.cpp
testfilelister.cpp
testunusedprivfunc.cpp
testincompletestatement.cpp
testunusedvar.cpp
testmathlib.cpp
)
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
ADD_EXECUTABLE(test ${CHECKTEST_SRCS})
TARGET_LINK_LIBRARIES(test checklib)