lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] [PATCH] Don't compile getopt.cpp twice as part getopt_test


From: Vadim Zeitlin
Subject: [lmi] [PATCH] Don't compile getopt.cpp twice as part getopt_test
Date: Mon, 26 Jan 2015 14:30:54 +0100

 Hello,

 While testing linking of the tests under Linux using automake, I found a
problem with one of them: getopt_test includes, IMO mistakenly, getopt.cpp
twice: first explicitly as one of the dependencies and second as part of
$(common_test_objects). This went unnoticed when using the official build
system under MSW as it uses --allow-multiple-definition linker option, but
results in errors with automake and I'd rather avoid ignoring such errors,
so I'd like to ask you to apply the following trivial patch:
---------------------------------- >8 --------------------------------------
diff --git a/Makefile.am b/Makefile.am
index c16de40..5ed0773 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -649,7 +649,6 @@ test_financial_CXXFLAGS = $(AM_CXXFLAGS)

 test_getopt_SOURCES = \
   $(common_test_objects) \
-  getopt.cpp \
   getopt_test.cpp
 test_getopt_CXXFLAGS = $(AM_CXXFLAGS)

diff --git a/objects.make b/objects.make
index c2534e5..c044f21 100644
--- a/objects.make
+++ b/objects.make
@@ -592,7 +592,6 @@ financial_test$(EXEEXT): \

 getopt_test$(EXEEXT): \
   $(common_test_objects) \
-  getopt.o \
   getopt_test.o \

 global_settings_test$(EXEEXT): \
---------------------------------- >8 --------------------------------------

 I've checked that this test still builds and works with this change under
Cygwin with MinGW using the official makefiles and that it now also builds
under Linux using automake makefiles.

 Thanks in advance,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]