From e2a6d4cec4a7ee952cf6a7f250d80f1d75a38f95 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 Apr 2012 09:10:14 -0400 Subject: cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch and for verifying no affected package is broken by this change. --- Debian/Debhelper/Buildsystem/cmake.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Debian') diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm index cddd4b49..98029efd 100644 --- a/Debian/Debhelper/Buildsystem/cmake.pm +++ b/Debian/Debhelper/Buildsystem/cmake.pm @@ -43,6 +43,12 @@ sub configure { push @flags, "-DCMAKE_INSTALL_PREFIX=/usr"; push @flags, "-DCMAKE_VERBOSE_MAKEFILE=ON"; + # CMake doesn't respect CPPFLAGS, see #653916. + if ($ENV{CPPFLAGS}) { + $ENV{CFLAGS} .= ' ' . $ENV{CPPFLAGS}; + $ENV{CXXFLAGS} .= ' ' . $ENV{CPPFLAGS}; + } + $this->mkdir_builddir(); eval { $this->doit_in_builddir("cmake", $this->get_source_rel2builddir(), @flags, @_); -- cgit v1.2.3