Add simple CMake build files to build lib and cli.
Apparently not everybody wants to use QMake to build cppcheck. Which is understandable if you only want to hack on/build lib and cli. Qt and QMake are pretty lot to install for just that. So lets start using CMake. It is widely used and is "just" build system and not programming framework. CMake is also easy to use for building Qt software too so it can replace QMake. This first commit only builds lib and cli for Linux.
This commit is contained in:
parent
1680d1fb42
commit
c85c0fbabc
|
@ -0,0 +1,15 @@
|
|||
# Minimal CMake build file
|
||||
# Builds static library from lib directory and commandline executable
|
||||
|
||||
# To build with CMake:
|
||||
# - install CMake 2.6 or later
|
||||
# - $ cmake .
|
||||
# - $ make
|
||||
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
|
||||
PROJECT(CPPCHECK)
|
||||
|
||||
ADD_SUBDIRECTORY(lib)
|
||||
ADD_SUBDIRECTORY(cli)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
# Minimal CMake build file to build cppcheck command line executable
|
||||
|
||||
SET(CHECKCLI_SRCS
|
||||
cppcheckexecutor.cpp
|
||||
threadexecutor.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
|
||||
ADD_EXECUTABLE(cppcheck ${CHECKCLI_SRCS})
|
||||
TARGET_LINK_LIBRARIES(cppcheck checklib)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# Minimal CMake build file to build static cppcheck library
|
||||
# This static library is used to build executables:
|
||||
# - cli
|
||||
|
||||
SET(CHECKLIB_SRCS
|
||||
checkautovariables.cpp
|
||||
checkmemoryleak.cpp
|
||||
filelister.cpp
|
||||
checkbufferoverrun.cpp
|
||||
checkother.cpp
|
||||
mathlib.cpp
|
||||
checkclass.cpp
|
||||
checkstl.cpp
|
||||
preprocessor.cpp
|
||||
checkdangerousfunctions.cpp
|
||||
checkunusedfunctions.cpp
|
||||
settings.cpp
|
||||
checkexceptionsafety.cpp
|
||||
cppcheck.cpp
|
||||
token.cpp
|
||||
checkheaders.cpp
|
||||
errorlogger.cpp
|
||||
tokenize.cpp
|
||||
)
|
||||
|
||||
ADD_LIBRARY(checklib STATIC ${CHECKLIB_SRCS})
|
||||
|
Loading…
Reference in New Issue