Skip to content

Commit 8741891

Browse files
committed
Merge pull request #69 from bittwiddler1/master
Adding conditional automake directives to allow Win32 compilation on win...
2 parents ae24d94 + 2d493d8 commit 8741891

4 files changed

Lines changed: 27 additions & 13 deletions

File tree

Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
ACLOCAL_AMFLAGS = -I m4
22
EXTRA_DIST = docs
3-
SUBDIRS = UnitTest++
3+
4+
include UnitTest++/Makefile.am
5+
include tests/Makefile.am

UnitTest++/Makefile.am

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
lib_LTLIBRARIES = libUnitTest++.la
2-
pkgincludedir = $(includedir)/UnitTest++
3-
nobase_pkginclude_HEADERS = UnitTest++.h UnitTestPP.h Config.h HelperMacros.h Test.h TestDetails.h TestList.h TestSuite.h TestResults.h TestMacros.h CheckMacros.h TestRunner.h TimeConstraint.h ExecuteTest.h AssertException.h MemoryOutStream.h CurrentTest.h Posix/SignalTranslator.h Checks.h TimeHelpers.h Posix/TimeHelpers.h ExceptionMacros.h ReportAssert.h ReportAssertImpl.h TestReporter.h TestReporterStdout.h CompositeTestReporter.h DeferredTestReporter.h DeferredTestResult.h
4-
libUnitTest___la_SOURCES = AssertException.cpp Test.cpp Checks.cpp TestRunner.cpp TestResults.cpp TestReporter.cpp TestReporterStdout.cpp ReportAssert.cpp TestList.cpp TimeConstraint.cpp TestDetails.cpp MemoryOutStream.cpp DeferredTestReporter.cpp DeferredTestResult.cpp XmlTestReporter.cpp CurrentTest.cpp Posix/SignalTranslator.cpp Posix/TimeHelpers.cpp CompositeTestReporter.cpp
5-
libUnitTest___la_LDFLAGS = -version-number @LIBUNITTEST_SO_VERSION@
6-
check_PROGRAMS = TestUnitTest++
7-
TestUnitTest___SOURCES = $(top_srcdir)/tests/Main.cpp $(top_srcdir)/tests/TestAssertHandler.cpp $(top_srcdir)/tests/TestCheckMacros.cpp $(top_srcdir)/tests/TestChecks.cpp $(top_srcdir)/tests/TestCompositeTestReporter.cpp $(top_srcdir)/tests/TestCurrentTest.cpp $(top_srcdir)/tests/TestDeferredTestReporter.cpp $(top_srcdir)/tests/TestExceptions.cpp $(top_srcdir)/tests/TestMemoryOutStream.cpp $(top_srcdir)/tests/TestTest.cpp $(top_srcdir)/tests/TestTestList.cpp $(top_srcdir)/tests/TestTestMacros.cpp $(top_srcdir)/tests/TestTestResults.cpp $(top_srcdir)/tests/TestTestRunner.cpp $(top_srcdir)/tests/TestTestSuite.cpp $(top_srcdir)/tests/TestTimeConstraint.cpp $(top_srcdir)/tests/TestTimeConstraintMacro.cpp $(top_srcdir)/tests/TestUnitTestPP.cpp $(top_srcdir)/tests/TestXmlTestReporter.cpp
8-
TestUnitTest___LDADD = libUnitTest++.la
9-
TESTS = TestUnitTest++
1+
lib_LTLIBRARIES = UnitTest++/libUnitTest++.la
2+
pkgincludedir = $(includedir)/UnitTest++/
3+
nobase_pkginclude_HEADERS = UnitTest++/UnitTest++.h UnitTest++/UnitTestPP.h UnitTest++/Config.h UnitTest++/HelperMacros.h UnitTest++/Test.h UnitTest++/TestDetails.h UnitTest++/TestList.h UnitTest++/TestSuite.h UnitTest++/TestResults.h UnitTest++/TestMacros.h UnitTest++/CheckMacros.h UnitTest++/TestRunner.h UnitTest++/TimeConstraint.h UnitTest++/ExecuteTest.h UnitTest++/AssertException.h UnitTest++/MemoryOutStream.h UnitTest++/CurrentTest.h UnitTest++/Checks.h UnitTest++/TimeHelpers.h UnitTest++/ExceptionMacros.h UnitTest++/ReportAssert.h UnitTest++/ReportAssertImpl.h UnitTest++/TestReporter.h UnitTest++/TestReporterStdout.h UnitTest++/CompositeTestReporter.h UnitTest++/DeferredTestReporter.h UnitTest++/DeferredTestResult.h
4+
UnitTest___libUnitTest___la_SOURCES = UnitTest++/AssertException.cpp UnitTest++/Test.cpp UnitTest++/Checks.cpp UnitTest++/TestRunner.cpp UnitTest++/TestResults.cpp UnitTest++/TestReporter.cpp UnitTest++/TestReporterStdout.cpp UnitTest++/ReportAssert.cpp UnitTest++/TestList.cpp UnitTest++/TimeConstraint.cpp UnitTest++/TestDetails.cpp UnitTest++/MemoryOutStream.cpp UnitTest++/DeferredTestReporter.cpp UnitTest++/DeferredTestResult.cpp UnitTest++/XmlTestReporter.cpp UnitTest++/CurrentTest.cpp UnitTest++/CompositeTestReporter.cpp
5+
6+
if WINDOWS
7+
nobase_pkginclude_HEADERS += UnitTest++/Win32/TimeHelpers.h
8+
UnitTest___libUnitTest___la_SOURCES += UnitTest++/Win32/TimeHelpers.cpp
9+
else
10+
nobase_pkginclude_HEADERS += UnitTest++/Posix/SignalTranslator.h UnitTest++/Posix/TimeHelpers.h
11+
UnitTest___libUnitTest___la_SOURCES += UnitTest++/Posix/SignalTranslator.cpp UnitTest++/Posix/TimeHelpers.cpp
12+
endif
13+
14+
UnitTest___libUnitTest___la_LDFLAGS = -version-number @LIBUNITTEST_SO_VERSION@
15+
16+

configure.ac

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ AC_CONFIG_SRCDIR([UnitTest++/TestDetails.cpp])
77
AC_CONFIG_MACRO_DIR([m4])
88
AC_CONFIG_HEADERS([config.h])
99

10-
AM_INIT_AUTOMAKE([foreign])
10+
AM_INIT_AUTOMAKE([foreign subdir-objects])
11+
AM_CONDITIONAL([WINDOWS],
12+
[test "${host#*mingw}" != "${host}" -o "${host#*msvc}" != "${host}"])
1113
LT_INIT()
1214

1315
AC_SUBST([LIBUNITTEST_SO_VERSION], [1:4:1])
@@ -29,6 +31,5 @@ AC_TYPE_SIZE_T
2931
# Checks for library functions.
3032
AC_CHECK_FUNCS([gettimeofday strstr])
3133

32-
AC_CONFIG_FILES([Makefile
33-
UnitTest++/Makefile])
34+
AC_CONFIG_FILES([Makefile])
3435
AC_OUTPUT

tests/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
check_PROGRAMS = UnitTest++/TestUnitTest++
2+
UnitTest___TestUnitTest___SOURCES = tests/Main.cpp tests/TestAssertHandler.cpp tests/TestCheckMacros.cpp tests/TestChecks.cpp tests/TestCompositeTestReporter.cpp tests/TestCurrentTest.cpp tests/TestDeferredTestReporter.cpp tests/TestExceptions.cpp tests/TestMemoryOutStream.cpp tests/TestTest.cpp tests/TestTestList.cpp tests/TestTestMacros.cpp tests/TestTestResults.cpp tests/TestTestRunner.cpp tests/TestTestSuite.cpp tests/TestTimeConstraint.cpp tests/TestTimeConstraintMacro.cpp tests/TestUnitTestPP.cpp tests/TestXmlTestReporter.cpp
3+
UnitTest___TestUnitTest___LDADD = UnitTest++/libUnitTest++.la
4+
TESTS = UnitTest++/TestUnitTest++

0 commit comments

Comments
 (0)