]> granicus.if.org Git - libatomic_ops/commitdiff
Add test_atomic_generalized to Makefile and Makefile.msft
authorIvan Maidanski <ivmai@mail.ru>
Fri, 27 Jan 2017 06:37:15 +0000 (09:37 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 27 Jan 2017 06:37:15 +0000 (09:37 +0300)
* 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
tests/Makefile.am

index 5417b6893d3cc3c1ef88afe408c937e625ec125f..5959e1f683825e28ef6a91251dc98d4e83d73efc 100644 (file)
@@ -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
index cc4aefd11dca0d7d204e71979fa355b8e8574a61..a846292be64a6814872489cd2f3cee3812f0a9a1 100644 (file)
@@ -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 \