summaryrefslogtreecommitdiff
path: root/Debian
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-04-17 09:10:14 -0400
committerJoey Hess <joey@kitenet.net>2012-04-17 09:10:14 -0400
commite2a6d4cec4a7ee952cf6a7f250d80f1d75a38f95 (patch)
treeb11af843fc2734264d8deb7dd165dd829e6256f6 /Debian
parente7e4465fe9e27e9ea4df7501ceccc675a9e54d35 (diff)
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch and for verifying no affected package is broken by this change.
Diffstat (limited to 'Debian')
-rw-r--r--Debian/Debhelper/Buildsystem/cmake.pm6
1 files changed, 6 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, @_);