summaryrefslogtreecommitdiff
path: root/Debian/Debhelper
diff options
context:
space:
mode:
Diffstat (limited to 'Debian/Debhelper')
-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 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, @_);