Skip to content

Commit

Permalink
CCache handling
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Sep 25, 2022
1 parent c661ae7 commit 6ec9d9f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
1 change: 1 addition & 0 deletions .ci/ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ elif [[ "$CI_NAME" == 'linux' ]]; then
make -j $(nproc) package || exit 3 &&
cp /hyperhdr/build/bin/h* /deploy/ 2>/dev/null || : &&
cp /hyperhdr/build/Hyper* /deploy/ 2>/dev/null || : &&
ccache -s &&
exit 0;
exit 1 " || { echo "---> HyperHDR compilation failed! Abort"; exit 5; }
ls -a .ccache
Expand Down
58 changes: 30 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,36 @@ set(CMAKE_AUTORCC ON)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

# Set build variables
SET ( DEFAULT_PROTOBUF ON )
SET ( DEFAULT_BOBLIGHT ON )
SET ( DEFAULT_WS281XPWM OFF )
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
SET ( DEFAULT_MF OFF )
SET ( DEFAULT_DX OFF )
SET ( DEFAULT_AVF OFF )
SET ( DEFAULT_MAC_SYSTEM OFF )
SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_X11 OFF )
SET ( DEFAULT_PIPEWIRE OFF )
SET ( DEFAULT_FRAMEBUFFER OFF )
SET ( DEFAULT_SOUNDCAPWINDOWS OFF )
SET ( DEFAULT_SOUNDCAPMACOS OFF )
SET ( DEFAULT_CEC OFF )
SET ( DEFAULT_BONJOUR ON )
SET ( DEFAULT_MQTT ON )
SET ( DEFAULT_STATIC_QT_PLUGINS OFF )
SET ( DEFAULT_PRECOMPILED_HEADERS ON )

# Configure CCache if available
find_program(CCACHE_FOUND ccache)
if ( CCACHE_FOUND )
if (DEFINED ENV{CCACHE_DIR})
message ( STATUS "Found CCache and its env settings: $ENV{CCACHE_DIR}. Will try to use it." )
message ( STATUS "Found CCache and its env settings: $ENV{CCACHE_DIR}. Will try to use it. Disabling precompiled headers." )
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
SET ( DEFAULT_PRECOMPILED_HEADERS OFF )
else()
message ( WARNING "Found CCache but env settings: CCACHE_DIR is not set. Skipping." )
endif()
Expand Down Expand Up @@ -52,30 +75,6 @@ ELSE()
SET( Qt_VERSION 5 )
ENDIF()


# Set build variables
SET ( DO_NOT_USE_QT_VERSION_6_LIBS OFF )
SET ( USE_PRECOMPILED_HEADERS ON )
SET ( DEFAULT_PROTOBUF ON )
SET ( DEFAULT_BOBLIGHT ON )
SET ( DEFAULT_WS281XPWM OFF )
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
SET ( DEFAULT_MF OFF )
SET ( DEFAULT_DX OFF )
SET ( DEFAULT_AVF OFF )
SET ( DEFAULT_MAC_SYSTEM OFF )
SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_X11 OFF )
SET ( DEFAULT_PIPEWIRE OFF )
SET ( DEFAULT_FRAMEBUFFER OFF )
SET ( DEFAULT_SOUNDCAPWINDOWS OFF )
SET ( DEFAULT_SOUNDCAPMACOS OFF )
SET ( DEFAULT_CEC OFF )
SET ( DEFAULT_BONJOUR ON )
SET ( DEFAULT_MQTT ON )
SET ( DEFAULT_STATIC_QT_PLUGINS OFF )

IF ( ${CMAKE_SYSTEM} MATCHES "Linux" )
SET ( DEFAULT_SOUNDCAPLINUX ON )
SET ( DEFAULT_V4L2 ON )
Expand Down Expand Up @@ -150,9 +149,9 @@ if ( "${PLATFORM}" MATCHES "osx" )
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
endif()

SET ( DEFAULT_AVF ON )
SET ( DEFAULT_MAC_SYSTEM ON )
SET ( USE_PRECOMPILED_HEADERS OFF )
SET ( DEFAULT_AVF ON )
SET ( DEFAULT_MAC_SYSTEM ON )
SET ( DEFAULT_PRECOMPILED_HEADERS OFF )
elseif ( "${PLATFORM}" MATCHES "rpi" )
SET ( DEFAULT_WS281XPWM ON )
SET ( DEFAULT_CEC ON )
Expand Down Expand Up @@ -359,6 +358,9 @@ message(STATUS "ENABLE_MQTT = ${ENABLE_MQTT}")
option(USE_STATIC_QT_PLUGINS "Enable static QT plugins" ${DEFAULT_STATIC_QT_PLUGINS})
message(STATUS "USE_STATIC_QT_PLUGINS = ${USE_STATIC_QT_PLUGINS}")

option(USE_PRECOMPILED_HEADERS "Enable precompiled headers (PCH)" ${DEFAULT_PRECOMPILED_HEADERS})
message(STATUS "USE_PRECOMPILED_HEADERS = ${USE_PRECOMPILED_HEADERS}")

SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf )
SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf )

Expand Down
2 changes: 1 addition & 1 deletion cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if ( ENABLE_CEC )
endif()
SET ( CPACK_DEBIAN_PACKAGE_SUGGESTS "libx11-6" )
SET ( CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous" )
SET ( CPACK_DEBIAN_COMPRESSION_TYPE "xz" )
SET ( CPACK_DEBIAN_COMPRESSION_TYPE "gzip" )

# .rpm for rpm
# https://cmake.org/cmake/help/v3.5/module/CPackRPM.html
Expand Down
1 change: 1 addition & 0 deletions sources/leddevice/dev_net/LedDevicePhilipsHue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <QDateTime>
#include <chrono>
#include <cmath>

// Constants
namespace {
Expand Down

0 comments on commit 6ec9d9f

Please sign in to comment.