2011-03-25 07:14:53 +01:00
|
|
|
# Minimal CMake build file to build static cppcheck library
|
|
|
|
# This static library is used to build executables:
|
|
|
|
# - cli
|
|
|
|
# - tests
|
|
|
|
# - Qt GUI
|
|
|
|
|
2011-04-02 13:25:18 +02:00
|
|
|
if(PCRE_FOUND)
|
|
|
|
add_definitions(-DHAVE_RULES)
|
|
|
|
include_directories("${PCRE_INCLUDE_DIR}")
|
|
|
|
endif()
|
|
|
|
|
2011-03-25 07:14:53 +01:00
|
|
|
set(CPPCHECK_LIB_DIR "")
|
|
|
|
include("library_sources.cmake")
|
|
|
|
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wshadow -Wno-long-long -Wfloat-equal -Wcast-qual")
|
|
|
|
endif (CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
|
|
|
add_library(checklib STATIC ${CPPCHECK_LIB_SOURCES})
|
2011-04-02 13:25:18 +02:00
|
|
|
|
|
|
|
if(PCRE_FOUND)
|
|
|
|
target_link_libraries(checklib ${PCRE_LIBRARIES})
|
|
|
|
endif()
|