From 13a17ddb62a7a2872ff83e0280dd3b43ad8087fc Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 27 Jan 2017 09:37:15 +0300 Subject: [PATCH] Add test_atomic_generalized to Makefile and Makefile.msft * src/Makefile.msft (test_atomic_generalized): New target (same as test_atomic but with -D AO_PREFER_GENERALIZED). * src/Makefile.msft (check): Add dependency on test_atomic_generalized; run test_atomic_generalized. * tests/Makefile.am (TESTS): Add test_atomic_generalized. * tests/Makefile.am [HAVE_PTHREAD_H] (TEST): Add test_atomic_pthreads instead of specifying all tests. * tests/Makefile.am (test_atomic_generalized_SOURCES, test_atomic_generalized_LDADD): Define (same as for test_atomic). * tests/Makefile.am (test_atomic_generalized_CPPFLAGS): Define specifying -D AO_PREFER_GENERALIZED. --- src/Makefile.msft | 7 ++++++- tests/Makefile.am | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Makefile.msft b/src/Makefile.msft index 5417b68..5959e1f 100644 --- a/src/Makefile.msft +++ b/src/Makefile.msft @@ -39,6 +39,10 @@ libatomic_ops_gpl.lib: $(LIB_OBJS) test_atomic: ..\tests\test_atomic.c ..\tests\test_atomic_include.h cl $(CFLAGS) -I. ..\tests\test_atomic.c /Fo.\test_atomic +test_atomic_generalized: ..\tests\test_atomic.c ..\tests\test_atomic_include.h + cl $(CFLAGS) -DAO_PREFER_GENERALIZED -I. ..\tests\test_atomic.c \ + /Fo.\test_atomic_generalized + test_malloc: ..\tests\test_malloc.c libatomic_ops_gpl.lib cl $(CFLAGS) -I. ..\tests\test_malloc.c /Fo.\test_malloc \ libatomic_ops_gpl.lib @@ -47,9 +51,10 @@ test_stack: ..\tests\test_stack.c libatomic_ops_gpl.lib cl $(CFLAGS) -I. ..\tests\test_stack.c /Fo.\test_stack \ libatomic_ops_gpl.lib -check: test_atomic check-noautogen +check: test_atomic test_atomic_generalized check-noautogen @echo "The following will print some 'Missing ...' messages" test_atomic + test_atomic_generalized check-noautogen: test_malloc test_stack test_malloc diff --git a/tests/Makefile.am b/tests/Makefile.am index cc4aefd..a846292 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,13 +12,12 @@ AM_CPPFLAGS = \ CFLAGS += $(CFLAGS_EXTRA) +TESTS = test_atomic test_atomic_generalized test_stack test_malloc if HAVE_PTHREAD_H -TESTS=test_atomic test_atomic_pthreads test_stack test_malloc +TESTS += test_atomic_pthreads test_atomic_pthreads_SOURCES=$(test_atomic_SOURCES) test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS) test_atomic_pthreads_LDADD=$(test_atomic_LDADD) -else -TESTS=test_atomic test_stack test_malloc endif check_PROGRAMS=$(TESTS) @@ -26,6 +25,10 @@ check_PROGRAMS=$(TESTS) test_atomic_SOURCES=test_atomic.c test_atomic_LDADD = $(THREADDLLIBS) $(top_builddir)/src/libatomic_ops.la +test_atomic_generalized_SOURCES=$(test_atomic_SOURCES) +test_atomic_generalized_CPPFLAGS=-DAO_PREFER_GENERALIZED $(AM_CPPFLAGS) +test_atomic_generalized_LDADD=$(test_atomic_LDADD) + test_stack_SOURCES=test_stack.c test_stack_LDADD = $(THREADDLLIBS) \ $(top_builddir)/src/libatomic_ops_gpl.la \ -- 2.50.0