]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Buildsystem/cmake.pm
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch...
[debhelper.git] / Debian / Debhelper / Buildsystem / cmake.pm
index cddd4b49e8375d3b24769db616dbf39cf823f4b8..98029efd21100cafe3e979570d660567589cd0ab 100644 (file)
@@ -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, @_);