Skip to content

Commit df3636b

Browse files
Mitigate S3 test interference + Unlimited Dimensions in NCZarr
This PR started as an attempt to add unlimited dimensions to NCZarr. It did that, but this exposed significant problems with test interference. So this PR is mostly about fixing -- well mitigating anyway -- test interference. The problem of test interference is now documented in the document docs/internal.md. The solutions implemented here are also describe in that document. The solution is somewhat fragile but multiple cleanup mechanisms are provided. Note that this feature requires that the AWS command line utility must be installed. ## Unlimited Dimensions. The existing NCZarr extensions to Zarr are modified to support unlimited dimensions. NCzarr extends the Zarr meta-data for the ".zgroup" object to include netcdf-4 model extensions. This information is stored in ".zgroup" as dictionary named "_nczarr_group". Inside "_nczarr_group", there is a key named "dims" that stores information about netcdf-4 named dimensions. The value of "dims" is a dictionary whose keys are the named dimensions. The value associated with each dimension name has one of two forms Form 1 is a special case of form 2, and is kept for backward compatibility. Whenever a new file is written, it uses format 1 if possible, otherwise format 2. * Form 1: An integer representing the size of the dimension, which is used for simple named dimensions. * Form 2: A dictionary with the following keys and values" - "size" with an integer value representing the (current) size of the dimension. - "unlimited" with a value of either "1" or "0" to indicate if this dimension is an unlimited dimension. For Unlimited dimensions, the size is initially zero, and as variables extend the length of that dimension, the size value for the dimension increases. That dimension size is shared by all arrays referencing that dimension, so if one array extends an unlimited dimension, it is implicitly extended for all other arrays that reference that dimension. This is the standard semantics for unlimited dimensions. Adding unlimited dimensions required a number of other changes to the NCZarr code-base. These included the following. * Did a partial refactor of the slice handling code in zwalk.c to clean it up. * Added a number of tests for unlimited dimensions derived from the same test in nc_test4. * Added several NCZarr specific unlimited tests; more are needed. * Add test of endianness. ## Misc. Other Changes * Modify libdispatch/ncs3sdk_aws.cpp to optionally support use of the AWS Transfer Utility mechanism. This is controlled by the ```#define TRANSFER```` command in that file. It defaults to being disabled. * Parameterize both the standard Unidata S3 bucket (S3TESTBUCKET) and the netcdf-c test data prefix (S3TESTSUBTREE). * Fixed an obscure memory leak in ncdump. * Removed some obsolete unit testing code and test cases. * Uncovered a bug in the netcdf-c handling of big-endian floats and doubles. Have not fixed yet. See tst_h5_endians.c. * Renamed some nczarr_tests testcases to avoid name conflicts with nc_test4. * Modify the semantics of zmap\#ncsmap_write to only allow total rewrite of objects. * Modify the semantics of zodom to properly handle stride > 1. * Add a truncate operation to the libnczarr zmap code.
1 parent 3c789c6 commit df3636b

File tree

152 files changed

+3588
-1888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+3588
-1888
lines changed

.github/workflows/run_tests_win_mingw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
msystem: MINGW64
2929
update: true
30-
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2
30+
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib
3131

3232
###
3333
# Configure and build

CMakeLists.txt

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ SET(EXTRA_DEPS "")
210210
ENABLE_TESTING()
211211
INCLUDE(CTest)
212212

213-
# Copy the CTest customization file into binary directory, as required.
214-
FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
215-
216213
# Set Memory test program for non-MSVC based builds.
217214
# Assume valgrind for now.
218215
IF((NOT MSVC) AND (NOT MINGW) AND (NOT ISCYGWIN))
@@ -1327,7 +1324,7 @@ ENDIF()
13271324
IF(ENABLE_S3)
13281325
IF(NOT ENABLE_S3_INTERNAL)
13291326
# See if aws-s3-sdk is available
1330-
find_package(AWSSDK REQUIRED COMPONENTS s3;core)
1327+
find_package(AWSSDK REQUIRED COMPONENTS s3;transfer)
13311328
IF(AWSSDK_FOUND)
13321329
SET(service s3;core)
13331330
AWSSDK_DETERMINE_LIBS_TO_LINK(service AWS_LINK_LIBRARIES)
@@ -1340,11 +1337,6 @@ ELSE()
13401337
SET(ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
13411338
ENDIF()
13421339

1343-
# Unless/until we get aws-sdk-cpp working for Windows, force use of internal
1344-
IF(ENABLE_S3 AND MSVC)
1345-
SET(ENABLE_S3_INTERNAL ON CACHE BOOL "S3 Intern" FORCE)
1346-
ENDIF()
1347-
13481340
IF(ENABLE_S3)
13491341
IF(NOT ENABLE_S3_AWS AND NOT ENABLE_S3_INTERNAL)
13501342
message(FATAL_ERROR "S3 support library not found; please specify option -DENABLE_S3=NO")
@@ -1891,6 +1883,10 @@ CHECK_TYPE_SIZE("uintptr_t" SIZEOF_UINTPTR_T)
18911883
IF(SIZEOF_UINTPTR_T)
18921884
SET(HAVE_UINTPTR_T TRUE)
18931885
ENDIF(SIZEOF_UINTPTR_T)
1886+
CHECK_TYPE_SIZE("mode_t" SIZEOF_MODE_T)
1887+
IF(SIZEOF_MODE_T)
1888+
SET(HAVE_MODE_T TRUE)
1889+
ENDIF(SIZEOF_MODE_T)
18941890

18951891
# __int64 is used on Windows for large file support.
18961892
CHECK_TYPE_SIZE("__int64" SIZEOF___INT_64)
@@ -2541,7 +2537,9 @@ SET(host_vendor "${osname}")
25412537
SET(host_os "${osrel}")
25422538
SET(abs_top_builddir "${CMAKE_CURRENT_BINARY_DIR}")
25432539
SET(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
2544-
2540+
STRING(RANDOM LENGTH 3 ALPHABET "0123456789" PLATFORMUID)
2541+
MATH(EXPR PLATFORMUID "${PLATFORMUID} + 1" OUTPUT_FORMAT DECIMAL)
2542+
25452543
SET(CC_VERSION "${CMAKE_C_COMPILER}")
25462544

25472545
# Build *FLAGS for libnetcdf.settings.
@@ -2600,15 +2598,32 @@ SET(NC_WHICH_S3_SDK "none")
26002598
endif()
26012599

26022600
if(WITH_S3_TESTING STREQUAL PUBLIC)
2603-
SET(DO_S3_TESTING "public")
2601+
SET(ENABLE_S3_TESTING "public")
26042602
elseif(WITH_S3_TESTING)
2605-
SET(DO_S3_TESTING "yes")
2603+
SET(ENABLE_S3_TESTING "yes")
2604+
SET(ENABLE_S3_TESTALL "yes")
26062605
elseif(NOT WITH_S3_TESTING)
2607-
SET(DO_S3_TESTING "no")
2606+
SET(ENABLE_S3_TESTING "no")
26082607
else()
2609-
SET(DO_S3_TESTING "no")
2608+
SET(ENABLE_S3_TESTING "no")
26102609
endif()
26112610

2611+
# The Unidata testing S3 bucket
2612+
# WARNING: this must match the value in configure.ac
2613+
SET(S3TESTBUCKET "unidata-zarr-test-data" CACHE STRING "S3 test bucket")
2614+
2615+
# The working S3 path tree within the Unidata bucket.
2616+
# WARNING: this must match the value in configure.ac
2617+
SET(S3TESTSUBTREE "netcdf-x" CACHE STRING "Working S3 path.")
2618+
# Build a unique id based on the date
2619+
string(TIMESTAMP TESTUID "%s")
2620+
if(ENABLE_S3_TESTING)
2621+
FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/s3cleanup_${PLATFORMUID}.uids" "${TESTUID}\n")
2622+
endif()
2623+
2624+
# Copy the CTest customization file into binary directory, as required.
2625+
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake")
2626+
26122627
# Generate file from template.
26132628
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"
26142629
"${CMAKE_CURRENT_BINARY_DIR}/libnetcdf.settings"
@@ -2653,6 +2668,15 @@ SET(TOPSRCDIR "${CMAKE_CURRENT_SOURCE_DIR}")
26532668
SET(TOPBUILDDIR "${CMAKE_CURRENT_BINARY_DIR}")
26542669
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_common.in ${CMAKE_CURRENT_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF)
26552670

2671+
####
2672+
# Build s3cleanup.sh and s3gc.sh
2673+
#####
2674+
SET(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/s3cleanup.in ${CMAKE_CURRENT_SOURCE_DIR}/s3gc.in)
2675+
SET(TOPSRCDIR "${CMAKE_CURRENT_SOURCE_DIR}")
2676+
SET(TOPBUILDDIR "${CMAKE_CURRENT_BINARY_DIR}")
2677+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/s3cleanup.in ${CMAKE_CURRENT_BINARY_DIR}/s3cleanup.sh @ONLY NEWLINE_STYLE LF)
2678+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/s3gc.in ${CMAKE_CURRENT_BINARY_DIR}/s3gc.sh @ONLY NEWLINE_STYLE LF)
2679+
26562680
#####
26572681
# Build and copy nc_test4/findplugin.sh to various places
26582682
#####
@@ -2679,6 +2703,13 @@ IF(ENABLE_TESTS)
26792703
# Build dap4_test/pingurl4.c
26802704
#####
26812705
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ncdap_test/pingurl.c ${CMAKE_CURRENT_BINARY_DIR}/dap4_test/pingurl4.c @ONLY NEWLINE_STYLE LF)
2706+
2707+
#####
2708+
# Build CTestCustom.cmake to cleanup S3 after tests are done.
2709+
#####
2710+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake NEWLINE_STYLE LF)
2711+
2712+
26822713
ENDIF()
26832714

26842715
if(DEFINED ENV{LIB_FUZZING_ENGINE})

CTestCustom.cmake renamed to CTestCustom.cmake.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@
1212
## for more information.
1313

1414
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "500")
15+
16+
IF(HAVE_BASH)
17+
IF(ENABLE_S3_TESTING)
18+
# Assume run in top-level CMAKE_BINARY_DIR
19+
set(CTEST_CUSTOM_POST_TEST "bash ${CMAKE_BINARY_DIR}/s3cleanup.sh")
20+
ENDIF()
21+
ENDIF()

Makefile.am

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --without-plugin-dir
3131
EXTRA_DIST = README.md COPYRIGHT INSTALL.md test_prog.c lib_flags.am \
3232
cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in \
3333
cmake_uninstall.cmake.in FixBundle.cmake.in nc-config.cmake.in \
34-
RELEASE_NOTES.md CTestCustom.cmake CTestConfig.cmake.in \
34+
RELEASE_NOTES.md CTestConfig.cmake.in CTestCustom.cmake.in \
3535
libnetcdf.settings.in netCDFConfig.cmake.in CMakeInstallation.cmake \
3636
test-driver-verbose test_common.in fuzz
3737

@@ -116,10 +116,8 @@ endif
116116

117117
# Optionally build test plugins
118118
if ENABLE_PLUGINS
119-
if ENABLE_FILTER_TESTING
120119
PLUGIN_DIR = plugins
121120
endif
122-
endif
123121

124122
# If benchmarks were turned on, build and run a bunch more tests.
125123
if BUILD_BENCHMARKS
@@ -209,7 +207,17 @@ install-data-hook:
209207

210208
# Create the VERSION file after the build
211209
# in case it is being used by packagers
210+
# Also track the S3 cleanup id
212211
all-local: liblib/libnetcdf.la
213212
echo ${PACKAGE_VERSION} > VERSION
213+
if ENABLE_S3_TESTALL
214+
echo "@TESTUID@" >> ${abs_top_builddir}/s3cleanup_@[email protected]
215+
endif
216+
217+
if ENABLE_S3_TESTALL
218+
distclean-local:
219+
rm -f ${abs_top_builddir}/s3cleanup_@[email protected]
220+
endif
221+
214222
# Remove the VERSION file
215223
CLEANFILES = VERSION

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This file contains a high-level description of this package's evolution. Release
77

88
## 4.9.3 - TBD
99

10+
* Mitigate the problem of test interference. See [Github #2736](https://github.com/Unidata/netcdf-c/pull/2736).
11+
* Extend NCZarr to support unlimited dimensions. See [Github #2736](https://github.com/Unidata/netcdf-c/pull/2736).
1012
* Fix significant bug in the NCZarr cache management. See [Github #2737](https://github.com/Unidata/netcdf-c/pull/2737).
1113
* Fix default parameters for caching of NCZarr. See [Github #2734](https://github.com/Unidata/netcdf-c/pull/2734).
1214
* Introducing configure-time options to disable various filters, even if the required libraries are available on the system, in support of [GitHub #2712](https://github.com/Unidata/netcdf-c/pull/2712).

config.h.cmake.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ are set when opening a binary file on Windows. */
163163
/* if true, enable S3 testing*/
164164
#cmakedefine WITH_S3_TESTING "PUBLIC"
165165

166+
/* S3 Test Bucket */
167+
#define S3TESTBUCKET "${S3TESTBUCKET}"
168+
169+
/* S3 Working subtree path prefix*/
170+
#define S3TESTSUBTREE "${S3TESTSUBTREE}"
171+
166172
/* if true, run extra tests which may not work yet */
167173
#cmakedefine EXTRA_TESTS 1
168174

@@ -337,6 +343,9 @@ are set when opening a binary file on Windows. */
337343
/* Define to 1 if you have the `snprintf' function. */
338344
#cmakedefine HAVE_SNPRINTF 1
339345

346+
/* Define to 1 if the system has the type `mode_t'. */
347+
#cmakedefine HAVE_MODE_T 1
348+
340349
/* Define to 1 if the system has the type `ssize_t'. */
341350
#cmakedefine HAVE_SSIZE_T 1
342351

configure.ac

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ AC_DEFINE_UNQUOTED([WITH_S3_TESTING], [$with_s3_testing], [control S3 testing.])
974974

975975
if test "x$with_s3_testing" = xyes ; then
976976
AC_MSG_WARN([*** DO NOT SPECIFY WITH_S3_TESTING=YES UNLESS YOU HAVE ACCESS TO THE UNIDATA S3 BUCKET! ***])
977+
AC_DEFINE([ENABLE_S3_TESTALL], [yes], [control S3 testing.])
977978
fi
978979

979980
# Check whether we want to enable strict null byte header padding.
@@ -1453,6 +1454,8 @@ AC_TYPE_UINTPTR_T
14531454
AC_C_CHAR_UNSIGNED
14541455
AC_C_BIGENDIAN
14551456

1457+
AC_CHECK_TYPES([mode_t])
1458+
14561459
AM_CONDITIONAL(ISCYGWIN, [test "x$ISCYGWIN" = xyes])
14571460
AM_CONDITIONAL(ISMSVC, [test "x$ISMSVC" = xyes])
14581461
AM_CONDITIONAL(ISOSX, [test "x$ISOSX" = xyes])
@@ -2033,7 +2036,7 @@ AC_SUBST(HAS_S3_AWS,[$enable_s3_aws])
20332036
AC_SUBST(HAS_S3_INTERNAL,[$enable_s3_internal])
20342037
AC_SUBST(HAS_HDF5_ROS3,[$has_hdf5_ros3])
20352038
AC_SUBST(HAS_NCZARR,[$enable_nczarr])
2036-
AC_SUBST(DO_S3_TESTING,[$with_s3_testing])
2039+
AC_SUBST(ENABLE_S3_TESTING,[$with_s3_testing])
20372040
AC_SUBST(HAS_NCZARR_ZIP,[$enable_nczarr_zip])
20382041
AC_SUBST(DO_NCZARR_ZIP_TESTS,[$enable_nczarr_zip])
20392042
AC_SUBST(HAS_QUANTIZE,[$enable_quantize])
@@ -2056,6 +2059,25 @@ if test "x$enable_s3_aws" = xno && test "x$enable_s3_internal" = xno; then
20562059
AC_SUBST(WHICH_S3_SDK,[none])
20572060
fi
20582061

2062+
# The Unidata testing S3 bucket
2063+
# WARNING: this must match the value in configure.ac
2064+
AC_DEFINE([S3TESTBUCKET], ["unidata-zarr-test-data"], [S3 test bucket])
2065+
AC_SUBST([S3TESTBUCKET],["unidata-zarr-test-data"])
2066+
2067+
# The working S3 path tree within the Unidata bucket.
2068+
AC_DEFINE([S3TESTSUBTREE], ["netcdf-x"], [S3 test path prefix])
2069+
AC_SUBST([S3TESTSUBTREE],[netcdf-x])
2070+
2071+
# Build a small unique id to avoid interference on same platform
2072+
PLATFORMUID="$RANDOM"
2073+
# Make sure uid > 0
2074+
PLATFORMUID=$((PLATFORMUID % 1000 + 1))
2075+
# Build a unique id based on the date
2076+
TESTUID=`date +%s`
2077+
AC_DEFINE_UNQUOTED([TESTUID], [${TESTUID}], [S3 working path])
2078+
AC_SUBST([TESTUID],${TESTUID})
2079+
AC_SUBST([PLATFORMUID],${PLATFORMUID})
2080+
20592081
# Always available
20602082
std_filters="bz2"
20612083
if test "x$have_deflate" = xyes ; then
@@ -2201,18 +2223,21 @@ AC_DEFINE_UNQUOTED([NC_DISPATCH_VERSION], [${NC_DISPATCH_VERSION}], [Dispatch ta
22012223
# This would be true for a cmake build.
22022224
AC_SUBST([ISCMAKE], [])
22032225

2204-
# Provide conditional to temporarily suppress tests and such
2205-
AM_CONDITIONAL([AX_IGNORE], [test xno = xyes])
2226+
# Provide true/false conditionals to temporarily suppress tests and such
2227+
AM_CONDITIONAL([AX_DISABLE], [test xno = xyes])
2228+
AM_CONDITIONAL([AX_ENABLE], [test xyes = xyes])
22062229
# Provide conditional to identify tests that must be run manually
22072230
AM_CONDITIONAL([AX_MANUAL], [test xno = xyes])
22082231

22092232
AC_MSG_NOTICE([generating header files and makefiles])
22102233
AC_CONFIG_FILES(test_common.sh:test_common.in)
2211-
AC_CONFIG_FILES(nc_test4/findplugin.sh:nc_test4/findplugin.in)
2212-
AC_CONFIG_FILES(nczarr_test/findplugin.sh:nc_test4/findplugin.in)
2213-
AC_CONFIG_FILES(plugins/findplugin.sh:nc_test4/findplugin.in)
2214-
AC_CONFIG_FILES(examples/C/findplugin.sh:nc_test4/findplugin.in)
2215-
AC_CONFIG_FILES(ncdap_test/findtestserver.c:ncdap_test/findtestserver.c.in)
2234+
AC_CONFIG_FILES(s3cleanup.sh:s3cleanup.in, [chmod ugo+x s3cleanup.sh])
2235+
AC_CONFIG_FILES(s3gc.sh:s3gc.in, [chmod ugo+x s3gc.sh])
2236+
AC_CONFIG_FILES(nc_test4/findplugin.sh:nc_test4/findplugin.in, [chmod ugo+x nc_test4/findplugin.sh])
2237+
AC_CONFIG_FILES(nczarr_test/findplugin.sh:nc_test4/findplugin.in, [chmod ugo+x nczarr_test/findplugin.sh])
2238+
AC_CONFIG_FILES(plugins/findplugin.sh:nc_test4/findplugin.in, [chmod ugo+x plugins/findplugin.sh])
2239+
AC_CONFIG_FILES(examples/C/findplugin.sh:nc_test4/findplugin.in, [chmod ugo+x examples/C/findplugin.sh])
2240+
AC_CONFIG_FILES(ncdap_test/findtestserver.c:ncdap_test/findtestserver.c.in, [chmod ugo+x ncdap_test/findtestserver.c])
22162241
AC_CONFIG_FILES([nc_test/run_pnetcdf_tests.sh:nc_test/run_pnetcdf_tests.sh.in],[chmod ugo+x nc_test/run_pnetcdf_tests.sh])
22172242
AC_CONFIG_FILES(dap4_test/findtestserver4.c:ncdap_test/findtestserver.c.in)
22182243
AC_CONFIG_FILES(dap4_test/pingurl4.c:ncdap_test/pingurl.c)
@@ -2269,6 +2294,7 @@ AC_CONFIG_FILES([Makefile
22692294
ncdap_test/testdata3/Makefile
22702295
ncdap_test/expected3/Makefile
22712296
ncdap_test/expectremote3/Makefile
2297+
ncdap_test/expectedhyrax/Makefile
22722298
dap4_test/Makefile
22732299
plugins/Makefile
22742300
nczarr_test/Makefile

dap4_test/test_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Test the netcdf-4 data building process.
2121
#endif
2222
#endif
2323

24-
#define DEBUG
24+
#undef DEBUG
2525

2626
static struct Options {
2727
char* file;

docs/cloud.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ Currently the following build cases are known to work.
8282
<tr><td>Linux <td>CMake <td>aws-s3-sdk <td>yes
8383
<tr><td>Linux <td>CMake <td>nch5s3comms <td>yes
8484
<tr><td>OSX <td>Automake <td>aws-s3-sdk <td>unknown
85-
<tr><td>OSX <td>Automake <td>nch5s3comms <td>unknown
85+
<tr><td>OSX <td>Automake <td>nch5s3comms <td>yes
8686
<tr><td>OSX <td>CMake <td>aws-s3-sdk <td>unknown
87-
<tr><td>OSX <td>CMake <td>nch5s3comms <td>unknown
88-
<tr><td>Visual Studio <td>CMake <td>aws-s3-sdk <td>no (tests-fail)
87+
<tr><td>OSX <td>CMake <td>nch5s3comms <td>yes
88+
<tr><td>Visual Studio <td>CMake <td>aws-s3-sdk <td>no (tests fail)
8989
<tr><td>Visual Studio <td>CMake <td>nch5s3comms <td>yes
90-
<tr><td>Cygwin <td>Automake <td>aws-s3-sdk <td>unknown
90+
<tr><td>Cygwin <td>Automake <td>aws-s3-sdk <td>no (tests fail)
9191
<tr><td>Cygwin <td>Automake <td>nch5s3comms <td>yes
92-
<tr><td>Cygwin <td>CMake <td>aws-s3-sdk <td>unknown
93-
<tr><td>Cygwin <td>CMake <td>nch5s3comms <td>unknown
92+
<tr><td>Cygwin <td>CMake <td>aws-s3-sdk <td>no
93+
<tr><td>Cygwin <td>CMake <td>nch5s3comms <td>yes
9494
<tr><td>Mingw <td>Automake <td>aws-s3-sdk <td>unknown
95-
<tr><td>Mingw <td>Automake <td>nch5s3comms <td>unknown
95+
<tr><td>Mingw <td>Automake <td>nch5s3comms <td>yes
9696
<tr><td>Mingw <td>CMake <td>aws-s3-sdk <td>unknown
97-
<tr><td>Mingw <td>CMake <td>nch5s3comms <td>unknown
97+
<tr><td>Mingw <td>CMake <td>nch5s3comms <td>yes
9898
</table>
9999

100100
## Automake
@@ -163,7 +163,7 @@ This library, [aws-sdk-cpp library](https://github.com/aws/aws-sdk-cpp.git),
163163
has a number of properties of interest:
164164
* It is written in C++
165165
* It is available on [GitHub](https://github.com/aws/aws-sdk-cpp.git),
166-
* It uses CMake + ninja as its primary build system.
166+
* It uses CMake as its primary build system.
167167

168168
### *\*nix\** Build
169169

@@ -179,18 +179,17 @@ pushd aws-sdk-cpp
179179
mkdir build
180180
cd build
181181
PREFIX=/usr/local
182-
FLAGS="-DCMAKE_INSTALL_PREFIX=${PREFIX} \
183-
-DCMAKE_INSTALL_LIBDIR=lib \
184-
-DCMAKE_MODULE_PATH=${PREFIX}/lib/cmake \
182+
FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local \
185183
-DCMAKE_POLICY_DEFAULT_CMP0075=NEW \
186-
-DBUILD_ONLY=s3 \
184+
-DBUILD_ONLY=s3;transfer \
187185
-DENABLE_UNITY_BUILD=ON \
188-
-DENABLE_TESTING=OFF \
189-
-DCMAKE_BUILD_TYPE=$CFG \
190-
-DSIMPLE_INSTALL=ON"
191-
cmake -GNinja $FLAGS ..
192-
ninja all
193-
ninja install
186+
-DCMAKE_BUILD_TYPE=Release \
187+
-DSIMPLE_INSTALL=ON \
188+
-DENABLE_TESTING=OFF
189+
190+
cmake $FLAGS ..
191+
cmake --build . --config Release
192+
sudo cmake --install . --config Release
194193
cd ..
195194
popd
196195
````

0 commit comments

Comments
 (0)