summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Buildsystem/cmake.pm6
-rw-r--r--debian/changelog8
2 files changed, 14 insertions, 0 deletions
diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm
index cddd4b4..98029ef 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, @_);
diff --git a/debian/changelog b/debian/changelog
index 326a600..a26abda 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (9.20120411) UNRELEASED; urgency=low
+
+ * cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813
+ Thanks, Simon Ruderich for the patch and for verifying no affected
+ package is broken by this change.
+
+ -- Joey Hess <joeyh@debian.org> Tue, 17 Apr 2012 09:09:19 -0400
+
debhelper (9.20120410) unstable; urgency=low
[ Joey Hess ]