Refactoring of tst_swap4b

This commit is contained in:
Ward Fisher 2015-07-28 11:14:07 -06:00
parent 49b7503148
commit da82e6dbbb
2 changed files with 10 additions and 3 deletions

View File

@ -17,12 +17,19 @@ SET (nc_test_SRC
ADD_EXECUTABLE(nc_test ${nc_test_SRC})
TARGET_LINK_LIBRARIES(nc_test
netcdf
# util.c explicitly uses libm
${HAVE_LIBM}
)
##
# The difficulties around tst_swap4b are easier solved if we
# include ncx.c directly and not try to coax the functionality
# out of libnetcdf.
##
ADD_EXECUTABLE(tst_swap4b tst_swap4b.c ${CMAKE_SOURCE_DIR}/libsrc/ncx.c ${CMAKE_SOURCE_DIR}/libsrc/ncx.h)
# Some extra tests
SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta tst_swap4b)
SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta)
IF(NOT HAVE_BASH)
SET(TESTS ${TESTS} tst_atts3)

View File

@ -16,7 +16,7 @@
(((a) >> 24) & 0x000000ff) )
/* Taken from ncx.c */
extern void swap4b(void *dst, const void *src);
void swap4b(void *dst, const void *src);
#include <stdio.h>