* create cppcheck and clangformat targets

* apply code style (#67)
* send values by reference
* fix warnings on plugin destruction by disconnecting dataengines first
* fix invalid hddtemp group definition
This commit is contained in:
arcan1s
2015-10-18 00:05:42 +03:00
parent 8645260f99
commit 17a8a1734b
80 changed files with 2134 additions and 1022 deletions

View File

@ -7,7 +7,7 @@ cmake_policy(SET CMP0011 NEW)
cmake_policy(SET CMP0015 NEW)
if (POLICY CMP0063)
cmake_policy(SET CMP0063 OLD)
endif()
endif ()
project(awesomewidgets)
set(PROJECT_AUTHOR "Evgeniy Alekseev")
@ -35,9 +35,12 @@ option(BUILD_RPM_PACKAGE "Build rpm package" OFF)
# build details
option(BUILD_FUTURE "Build with the features which will be marked as stable later" OFF)
option(BUILD_TESTING "Build with additional test abilities" OFF)
# some additional targets
set(CPPCHECK_EXECUTABLE "/usr/bin/cppcheck" CACHE STRING "Path to cppcheck executable")
set(CLANGFORMAT_EXECUTABLE "/usr/bin/clang-format" CACHE STRING "Path to clang-format executable")
# flags
if(CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-Wall -Wno-cpp -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
@ -55,22 +58,24 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_SHARED_LINKER_FLAGS "-lc++abi")
else()
message(FATAL_ERROR "Unknown compiler")
endif()
if(CMAKE_BUILD_TYPE MATCHES Debug)
endif ()
if (CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
endif ()
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
set(PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
set(PROJECT_LIBRARY awesomewidgets)
include(libraries.cmake)
include(clang-format.cmake)
include(cppcheck.cmake)
add_subdirectory(awesomewidgets)
add_subdirectory(extsysmon)
if(BUILD_PLASMOIDS)
if (BUILD_PLASMOIDS)
add_subdirectory(awesome-widget)
add_subdirectory(desktop-panel)
add_subdirectory(translations)
endif()
endif ()
include(packages-recipe.cmake)