diff --git a/CMakeLists.txt b/CMakeLists.txt index 03af14843..492d33123 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 000000000..3bfebcc17 --- /dev/null +++ b/test/CMakeLists.txt @@ -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) +