cppcheck/lib/CMakeLists.txt

24 lines
616 B
CMake
Raw Normal View History

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
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})
if(PCRE_FOUND)
target_link_libraries(checklib ${PCRE_LIBRARIES})
endif()