summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-06-18 11:17:19 -0700
committerChase Douglas <chase.douglas@canonical.com>2012-07-03 17:50:20 -0700
commit3fefcde53f8b69b37baeec61265f2e0190713fe6 (patch)
tree477130f32273133db3547d2e89aa056821b40fce
parentb6dcdde9ecd63e2ea54ce0bfbeb4570a4d91a6c4 (diff)
Ensure xorg-gtest implementation is included in xorg-gtest{-all, _main}.cpp
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@canonical.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/Makefile-xorg-gtest.am2
1 files changed, 2 insertions, 0 deletions
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) \