Commit d86271a0 authored by Markus Frosch's avatar Markus Frosch
Browse files

rules: Cleanup flag handling for cmake

parent be06ed23
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
#export DH_VERBOSE=1 #export DH_VERBOSE=1
LTO_BUILD = -DICINGA2_LTO_BUILD=On CMAKE_FLAGS = -DICINGA2_LTO_BUILD=On
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(wildcard /usr/include/icinga-boost)) ifneq (,$(wildcard /usr/include/icinga-boost))
BOOST_FLAGS = \ CMAKE_FLAGS += \
-DBoost_NO_BOOST_CMAKE=TRUE \ -DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE \ -DBoost_NO_SYSTEM_PATHS=TRUE \
-DBOOST_LIBRARYDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/icinga-boost \ -DBOOST_LIBRARYDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/icinga-boost \
...@@ -17,18 +17,13 @@ endif ...@@ -17,18 +17,13 @@ endif
# disable unity/lto builds for arches with low memory # disable unity/lto builds for arches with low memory
ifneq ($(findstring $(DEB_HOST_ARCH), armhf),) ifneq ($(findstring $(DEB_HOST_ARCH), armhf),)
UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off CMAKE_FLAGS += -DICINGA2_UNITY_BUILD=Off
LTO_BUILD = -DICINGA2_LTO_BUILD=Off CMAKE_FLAGS += -DICINGA2_LTO_BUILD=Off
endif endif
ifneq ($(findstring $(DEB_HOST_ARCH), mips),) ifneq ($(findstring $(DEB_HOST_ARCH), mips),)
UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off CMAKE_FLAGS += -DICINGA2_UNITY_BUILD=Off
LTO_BUILD = -DICINGA2_LTO_BUILD=Off CMAKE_FLAGS += -DICINGA2_LTO_BUILD=Off
endif
ifneq ($(findstring $(DEB_HOST_ARCH), mipsel),)
UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off
LTO_BUILD = -DICINGA2_LTO_BUILD=Off
endif endif
%: %:
...@@ -59,9 +54,7 @@ override_dh_auto_configure: ...@@ -59,9 +54,7 @@ override_dh_auto_configure:
-DICINGA2_GIT_VERSION_INFO=false \ -DICINGA2_GIT_VERSION_INFO=false \
-DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins \ -DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins \
-DUSE_SYSTEMD=ON \ -DUSE_SYSTEMD=ON \
$(BOOST_FLAGS) \ $(CMAKE_FLAGS)
$(UNITY_BUILD) \
$(LTO_BUILD)
override_dh_auto_install: override_dh_auto_install:
dh_auto_install dh_auto_install
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment