Merge pull request #78 from Microsoft/vs2015Support

Vs2015 support
diff --git a/Makefile.am b/Makefile.am
index aac5b88..e26a370 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
 ACLOCAL_AMFLAGS = -I m4
 EXTRA_DIST = docs
-SUBDIRS = UnitTest++
+
+include UnitTest++/Makefile.am
+include tests/Makefile.am
diff --git a/UnitTest++/Makefile.am b/UnitTest++/Makefile.am
index 399a022..32f6477 100644
--- a/UnitTest++/Makefile.am
+++ b/UnitTest++/Makefile.am
@@ -1,9 +1,16 @@
-lib_LTLIBRARIES = libUnitTest++.la
-pkgincludedir = $(includedir)/UnitTest++
-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
-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
-libUnitTest___la_LDFLAGS = -version-number @LIBUNITTEST_SO_VERSION@
-check_PROGRAMS = TestUnitTest++
-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
-TestUnitTest___LDADD = libUnitTest++.la
-TESTS = TestUnitTest++
+lib_LTLIBRARIES = UnitTest++/libUnitTest++.la
+pkgincludedir = $(includedir)/UnitTest++/
+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
+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
+
+if WINDOWS 
+nobase_pkginclude_HEADERS += UnitTest++/Win32/TimeHelpers.h
+UnitTest___libUnitTest___la_SOURCES += UnitTest++/Win32/TimeHelpers.cpp
+else 
+nobase_pkginclude_HEADERS += UnitTest++/Posix/SignalTranslator.h UnitTest++/Posix/TimeHelpers.h
+UnitTest___libUnitTest___la_SOURCES += UnitTest++/Posix/SignalTranslator.cpp UnitTest++/Posix/TimeHelpers.cpp
+endif
+
+UnitTest___libUnitTest___la_LDFLAGS = -version-number @LIBUNITTEST_SO_VERSION@
+
+
diff --git a/configure.ac b/configure.ac
index 6bdb316..63a816e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,9 @@
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
 
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_CONDITIONAL([WINDOWS],
+	  [test "${host#*mingw}" != "${host}" -o "${host#*msvc}" != "${host}"])
 LT_INIT()
 
 AC_SUBST([LIBUNITTEST_SO_VERSION], [1:4:1])
@@ -29,6 +31,5 @@
 # Checks for library functions.
 AC_CHECK_FUNCS([gettimeofday strstr])
 
-AC_CONFIG_FILES([Makefile
-		 UnitTest++/Makefile])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..5306292
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,4 @@
+check_PROGRAMS = UnitTest++/TestUnitTest++
+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
+UnitTest___TestUnitTest___LDADD = UnitTest++/libUnitTest++.la
+TESTS = UnitTest++/TestUnitTest++
diff --git a/tests/TestTestMacros.cpp b/tests/TestTestMacros.cpp
index 2ed9659..f2fcbf0 100644
--- a/tests/TestTestMacros.cpp
+++ b/tests/TestTestMacros.cpp
@@ -160,6 +160,11 @@
 	CHECK(strstr(reporter.lastFailedMessage, "while constructing fixture"));
 }
 
+// Visual Studio 2015 in compliance with C++11 standard
+// implicitly adds a 'noexcept' to all user defined 
+// destructors. Any exceptions thrown from destructors
+// cause abort() to be called on the process.
+#if(_MSC_VER < 1900)
 struct FixtureDtorThrows
 {
 	~FixtureDtorThrows() _NOEXCEPT_OP(false) { throw "exception"; }
@@ -185,6 +190,7 @@
 	CHECK_EQUAL(1, failureCount);
 	CHECK(strstr(reporter.lastFailedMessage, "while destroying fixture"));
 }
+#endif 
 
 const int FailingLine = 123;