[PATCH xorg-gtest] Ensure xorg-gtest implementation is included in xorg-gtest{-all,_main}.cpp
Peter Hutterer
peter.hutterer at who-t.net
Mon Jul 2 19:37:49 PDT 2012
On Mon, Jun 18, 2012 at 11:17:19AM -0700, Chase Douglas wrote:
> GNU automake puts -I. -I.. at the beginning of every invocation of g++.
> This breaks xorg-gtest compilation if there is a file of the same name
> as an xorg-gtest implementation file in ../src/ or ../../src. For
> example, if compiling xorg-gtest-all.cpp in /home/user1/library/test
> and there exists /home/user1/library/src/device.cpp, the library's
> device.cpp file will be included instead of xorg-gtest's.
>
> This change adds a -iquote option to xorg-gtest compilation performed in
> Makefile-xorg-gtest.am. Directories specified with -iquote are searched
> ahead of directories specified by -I.
>
> This changes Makefile-xorg-gtest.am, which projects can copy to provide
> rules for building xorg-gtest in autotools projects. For substantial
> changes, projects will want to import the latest version of this file,
> but this particular fix is only needed if a project runs into build
> issues. If your project builds without issue, there is no need to
> replace the existing version of Makefile-xorg-gtest.am.
>
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
yikes. this custom compilation stuff is certainly messy.
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
Cheers,
Peter
> ---
> src/Makefile-xorg-gtest.am | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/Makefile-xorg-gtest.am b/src/Makefile-xorg-gtest.am
> index 20983eb..4f36b13 100644
> --- a/src/Makefile-xorg-gtest.am
> +++ b/src/Makefile-xorg-gtest.am
> @@ -42,6 +42,7 @@ libxorg_gtest_a_CPPFLAGS = \
> $(XORG_GTEST_CPPFLAGS) \
> $(GTEST_CPPFLAGS) \
> $(AM_CPPFLAGS) \
> + -iquote$(XORG_GTEST_SOURCE) \
> -w
> libxorg_gtest_a_CXXFLAGS = \
> $(XORG_GTEST_CXXFLAGS) \
> @@ -54,6 +55,7 @@ libxorg_gtest_main_a_CPPFLAGS = \
> $(XORG_GTEST_CPPFLAGS) \
> $(GTEST_CPPFLAGS) \
> $(AM_CPPFLAGS) \
> + -iquote$(XORG_GTEST_SOURCE) \
> -w
> libxorg_gtest_main_a_CXXFLAGS = \
> $(XORG_GTEST_CXXFLAGS) \
> --
> 1.7.9.5
>
More information about the xorg-devel
mailing list