X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debian%2FDebhelper%2FBuildsystem%2Fcmake.pm;h=f318b44b827e7609dc116fbb1f98131a74af449e;hb=e7f5f747e04176bda1d0e353eee3e0b5445b70f8;hp=cddd4b49e8375d3b24769db616dbf39cf823f4b8;hpb=0f5a8c3b6f2c0687b55468edc0f26bf2a4df95e9;p=debhelper.git diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm index cddd4b4..f318b44 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} && ! compat(8)) { + $ENV{CFLAGS} .= ' ' . $ENV{CPPFLAGS}; + $ENV{CXXFLAGS} .= ' ' . $ENV{CPPFLAGS}; + } + $this->mkdir_builddir(); eval { $this->doit_in_builddir("cmake", $this->get_source_rel2builddir(), @flags, @_);