Skip to content

Commit

Permalink
Squashed 'externals/coda-oss/' changes from 605d24898..cbfb20ce2
Browse files Browse the repository at this point in the history
cbfb20ce2 update release notes for C++11/master release (#658)
REVERT: 605d24898 duplicate existing HDF5 unittests using HighFive (#657)
REVERT: 134233279 add 'override'; fix ASAN-detected memory leaks (#656)
REVERT: 4c68fa0d3 fix directory names
REVERT: 5ee2f039a poor-man's version of "import module std;" (#655)
REVERT: fad02842c Add HighFive library (#654)
REVERT: b31f5b6ab have Python 3.6 on a build server
REVERT: ba8547621 don't put 'struct' in the macro
REVERT: bd79aa11f require Python 3.7, do MD5 check
REVERT: ecfa687c5 use std::filesystem (instead of sys::filesystem) where possible (#652)
REVERT: 243bc9991 add 'override'
REVERT: c0fd2124d wrap common "file open" routines to support sys::expandEnviromentVariables() (#651)
REVERT: 0657f3297 adjust compiler flags for clean CMake builds (#650)
REVERT: 81285872f build cleanly with all G++ warnings enabled (#649)
REVERT: b9ea37bbf xml::lite::Validator can be moved (#648)
REVERT: 9cfe9a4a8 Merge branch 'master'
REVERT: e989b0910 createElement() needs to be virtual (#646)
REVERT: d17b57a54 Merge branch 'master'
REVERT: fa00a5430 move debug -g flags to be turned on only if debugging (#644)
REVERT: 44ab72854 routines for simple writing to HDF5 files (#643)
REVERT: aabc5818e remove more C++11 work-arounds (#642)
REVERT: b04ccca17 remove more C++11 work-arounds (#641)
REVERT: e460970a7 increase GCC warnings (#640)
REVERT: 91284249b provide ComplexView iterator support (#639)
REVERT: 453b7ec68 try to get std::make_unique working with old Intel compiler (#638)
REVERT: 5736cfd4d is_trivially_copyable for old Intel compiler (#637)
REVERT: 7c2aea38f use H5 SDK naming conventions (#636)
REVERT: fc3008b8d use 'modern' C pre-processor
REVERT: b44709a95 added ComplexSpansView utility (#635)
REVERT: 986307c9c Merge branch 'master'
REVERT: 3fd5ddae5 Merge branch 'main' into develop/remove-cpp11-workarounds
REVERT: 37d7ec76e restore C++14 workarounds for older compilers (#632)
REVERT: 244dfdb3d Merge branch 'develop/main' into develop/remove-cpp11-workarounds
REVERT: 714ca4ed7 restore C++14 workarounds for older compilers
REVERT: 640f2247c Delete hdf5-hdf5-1_13_2.tar.gz
REVERT: eb365cbfb Merge branch 'master' into develop/remove-cpp11-workarounds
REVERT: 57b938eeb don't need __INTEL_COMPILER work-around with C++14
REVERT: 65779f3b1 build C code with -std=gnu99
REVERT: 94dc9280f C++14 work-arounds for an old version of the Intel compiler
REVERT: 3744d05e2 slam-in "main"
REVERT: 82b2fd63b restore some C++14 work-arounds for old compilers that only have partial C++14 support
REVERT: 94f6950a2 Merge branch 'main' into develop/remove-cpp11-workarounds
REVERT: 1582c6ac9 further progress on implementing hdf5::lite (#631)
REVERT: 0622af1fe rename "11" exception classes to "Ex" (#630)
REVERT: 1384b8a5e Merge pull request #629 from mdaus/zlib-update
REVERT: ebbd57247 ZIP APIs use std::string in this branch
REVERT: 9cc19fe82 ZIP unittests
REVERT: b8d25d364 Update zlib to 1.2.13
REVERT: c53304a90 using std::auto_ptr can cause 'deprecated' warnings
REVERT: 418130d4d trying to fix build error on github
REVERT: 59d2f678e Release 2022-12-14 (#628)
REVERT: 1e8244291 new --with-optz=fastest-possible option (#627)
REVERT: 6ae81142d new --optz=faster option for WAF builds (#626)
REVERT: 11206c179 sym-links don't work on Windows filesystems
REVERT: edd3e8fb9 overloads to make simplify routine XML processing (#625)
REVERT: dfece6106 use sym-links rather than copying files (#624)
REVERT: 22f1f0776 build hdf5.lite with WAF (#623)
REVERT: 566597043 Conan versioning, hdf5, and pcre2 fixes (#622)
REVERT: 61aa5e430 Squashed commit of the following:
REVERT: 6557ee34c Yet another attempt at finding test files for unittests (#621)
REVERT: 501add035 -march=native for fastest optimization level (#620)
REVERT: f1dd0a5b4 overloads to make creating XML documents easier (#619)
REVERT: ab4546482 remove C++17 workarounds (#618)
REVERT: 3d5daf702 unittests for creating XML from scratch (#617)
REVERT: 8241dfe7e remove last vestiges of std::auto_ptr (#616)
REVERT: d06dc6534 mem::AutoPtr for C++17 (#615)
REVERT: 83443602a mem::AutoPtr class to aid C++17 transition (#614)
REVERT: f10fa2009 Release 2022-11-04 (#613)
REVERT: 8ab982820 Squashed commit of the following:
REVERT: 31781a14a remove C++17 work-arounds
REVERT: c15f6930c Revert "<filesystem> is in C++17"
REVERT: 0fe38c16f restore recent buld.py changes
REVERT: 0c75411ee <filesystem> is in C++17
REVERT: bbbcd562a remove C++11 work-arounds
REVERT: c1e15e9d9 Merge branch 'main' into main-cpp17
REVERT: a32e69704 remove exception specifications (#609)
REVERT: bea818fb0 must use C++17 in this branch
REVERT: 91653a096 another place where C++17 is set
REVERT: 7d555f2be back to C++17
REVERT: b1969d996 merge main
REVERT: 084f19126 utilities to find files/directories for unittests (#608)
REVERT: a3cedada9 Merge branch 'master'
REVERT: af7229bd8 utilities to find files from a build (#605)
REVERT: 264ae49dd be sure downstream projects build w/C++14 (#604)
REVERT: 0792c77bf Merge branch 'main' into develop/remove-cpp11-workarounds
REVERT: 7a7b13cbd "hello world" for HDF5 (#602)
REVERT: 33cff0ff4 more C++14
REVERT: 7b5e71a00 add HDF5 source code (#603)
REVERT: ec26f703e build in NITRO and SIX (#601)
REVERT: f4361a973 make it easier to write cli unit-tests (#600)
REVERT: 34b6fdeee tweak toString() to reduce specialization (#599)
REVERT: e49f273c1 Merge branch 'main' into develop/remove-cpp11-workarounds
REVERT: 240b61044 allow sys::Mutex references, instead of pointers, to be passed to sys::ConditionVar
REVERT: 5907b3ed6 remove C++11 workarounds (#598)
REVERT: 9500d6f4b Merge branch 'main' into develop/remove-cpp11-workarounds
REVERT: f1529942f std::make_unique instead of new
REVERT: be9b6a71c Squashed commit of the following:
REVERT: 62a2ec4e1 Revert "remove our GSL work-around for C++11"
REVERT: 1db082c21 Revert "try the current "main" of GSL"
REVERT: 44b70edde try the current "main" of GSL
REVERT: 4edbf6bad Revert ""There is no warning 4814""
REVERT: bcd7458be "There is no warning 4814"
REVERT: c185bf3f1 starting working on MutexCpp11
REVERT: 313bdd1d9 AtomicCounter* files have been removed
REVERT: c1c448051 remove our GSL work-around for C++11
REVERT: 37ae1193e remove our mem::SharedPtr, it's now always std::shared_ptr
REVERT: 71f3c1299 remove no-longer-used NSPR code
REVERT: 8e77cb210 removed no-longer-used Irix and Solaris files
REVERT: fabef6966 use std::atomic for all AtomicCounter implementations
REVERT: ace5b6d5a TEST_FAIL -> TEST_FAIL_MSG
REVERT: 30076c1d1 turns out there was already a TEST_FAIL macro
REVERT: d73ee16fb need "::" to find global test
REVERT: ba01c48df remove C++11 workarounds for C++14 features
REVERT: cbd4a31ae Squashed commit of the following:
REVERT: caed59480 Release 2022-08-30_cpp14 (#597)
REVERT: 2630d41e0 get rid of merge conflict
REVERT: 652bce385 Merge branch 'master'
REVERT: 838c323d6 Merge branch 'master'
REVERT: 4189c429e Merge branch 'master'
REVERT: 903ee7fff Merge branch 'master'
REVERT: a1c0a1eea Merge branch 'master'
REVERT: 1bfe5fc40 Merge branch 'master'
REVERT: b21c203b8 Squashed commit of the following:
REVERT: 6c2df8bb6 "main" is now C++14 (not C++20)
REVERT: 2ce416108 Squashed commit of the following:
REVERT: 3a0f7fd14 Merge branch 'master'
REVERT: 142fd7185 Merge branch 'master'
REVERT: d442e5be0 Merge branch 'master'
REVERT: 32f08a9e4 Squashed commit of the following:
REVERT: ee15ba317 Merge branch 'master'
REVERT: bede75354 fix unit-test with C++20
REVERT: 61a8033f6 consistent use of coda_oss:: and std::
REVERT: 5d3bf9eb8 Merge branch 'master'
REVERT: 34c40bd39 Merge branch 'master'
REVERT: a9b9d2a9f Merge branch 'master'
REVERT: 24a3f01af Merge branch 'master'
REVERT: f92811a53 Merge branch 'master'
REVERT: 5b542c60f Squashed commit of the following:
REVERT: cb0cf94ff ByteStream.cpp is now warning-free
REVERT: f5daa37fc cast to DWORD; "const" correctness
REVERT: bfaf644ff #pragma-away compiler warnings from standard headers
REVERT: 72d202dbe Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 414c25c55 build with C++20 in VS
REVERT: 1a99a29da Merge branch 'master'
REVERT: 5cca863d7 Merge branch 'master'
REVERT: 6d4776235 Merge branch 'master'
REVERT: 8f1173f4a fix build errors
REVERT: f21af35b0 Merge branch 'master'
REVERT: 4db8ada41 restore changes clobbered with merge from "master"
REVERT: a1f36e183 Merge branch 'master'
REVERT: 80fe8e9f8 Merge branch 'master'
REVERT: 33b0f3f6e Merge branch 'master'
REVERT: 8bd0c8cf4 Merge branch 'main' of github.com:mdaus/coda-oss
REVERT: 7e41b4b5e Merge branch 'feature/use-cpp11-code'
REVERT: fc99e4b3e recreate from "master"
REVERT: 510317c07 use std::filesystem to "implement" sys::filesystem
REVERT: 895f6c77c always implement sys::filesystem
REVERT: 0d83ae22f "units" changes from master
REVERT: b58173b78 latest from "master" (not quite)
REVERT: 793e3442c Squashed commit of the following:
REVERT: 91a729f5a re-create from "master"
REVERT: b076580cd trying to fix GCC compiler warning
REVERT: 1687dc7fc Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 2c5db86db Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 6f76c2e3e Update CMakeLists.txt
REVERT: c3ca4a538 do in-line initialization
REVERT: 8e6733618 remove G++ compiler warning
REVERT: a0eff51cf Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: af19d88a6 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: ba31cbaa9 use "void*" to avoid reinterpret_cast<>
REVERT: 08da1f8a1 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: d1d453a2e Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: f5074a996 CODA_OSS_NDEBUG is extra gunk and not used; omit for now.
REVERT: 22de48858 don't even bother compiling our own versions of localtime_s() and gmtime_s() if we're not going to use them (compiler warning about "unused static funtion.")
REVERT: 0c92eba58 tweak NDEBUG/CODA_OSS_NDEBUG; update comments
REVERT: 544604775 Don't need to expose our own versions of localtime_s() and gmtime_s()
REVERT: a050796c1 Merge branch 'develop/reduce-compiler-warnings' of github.com:mdaus/coda-oss into develop/reduce-compiler-warnings
REVERT: fed604617 older compilers want std::string() as argument to std::logic_error()
REVERT: cf2c502a6 do more debug & release builds on GitHub
REVERT: d4aa99256 build some debug targets on Gitlab
REVERT: 368245258 tweak CODA_OSS_DEBUG again for G++
REVERT: 24ba64f71 tweak how CODA_OSS_DEBUG is set
REVERT: 9680e8f0e add check for _GLIBCXX_DEBUG
REVERT: 943218f83 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 01c68e705 %#@*@%)*%@ fix RowCol::cast() again! :-(
REVERT: b8472b457 oops ... gsl::narrow<> should be gsl::narrow_cast<> so that int/double conversion doesn't throw
REVERT: 109255ca8 "final" breaks SWIG; wrap RowCol use of gsl::narrow
REVERT: e51e4c2ad no need to create local just to return
REVERT: e546f2510 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: d1391f989 use template for to_std_string() overloading
REVERT: 566942680 fix std::char8_t when building with C++20
REVERT: cf604b1ab fix C++17 build errors
REVERT: 48a0fbedb get rid of coda_oss namespace; use CODA_OSS_cpp17 instead
REVERT: 9706a4336 remove code-analysis diagnostics
REVERT: 50592e4f8 G++ complains about an unneeded call to std::move()
REVERT: 9c7643c3f Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: ecfe1f8a7 more "noexcept"
REVERT: b7ac50fb9 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: eaecf46ed tweak CODA_OSS_cplusplus from "main"
REVERT: 5773b1ec1 trying to get C++17 WAF build working on Windows
REVERT: a048a00a1 unique names for waf & CMake
REVERT: 7a5a0d5b2 do a better job of setting CODA_OSS_DEBUG
REVERT: 4355aae92 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 1fd8cede2 cleanup for VS 2019 16.10
REVERT: 4dffa1394 explicitly =delete copy/assignment
REVERT: df8f8920a Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 42b4e99b6 remove code-analysis diagnostics
REVERT: 70ce322c9 reduce compiler warnings/code-analysis diagnostics when building six
REVERT: 20eac2f49 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: ff3ded56d get rid of more compiler warnings/code-analysis diagnostics
REVERT: 669dd51ff Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 623b65ab9 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 11c75df53 fix release build errors
REVERT: 66f048b92 turn on more compiler warnings where possible
REVERT: eb615e315 consolidate calls to mem::make::unique
REVERT: a6f5eb690 reduce use of explicit new
REVERT: 84d5e1b01 use mem::make::unique instead of explicit new
REVERT: 019d726ea = default for default constructors
REVERT: 86ab5d8f3 use std::unique_ptr and "const noexcept"
REVERT: b071972d7 another batch of =default for default constructors
REVERT: 98276da94 more =default for default .ctor()s
REVERT: ceb7bc596 do default constructors with =default
REVERT: 7bed51750 more code-analysis cleanup
REVERT: f9c04b117 "noexcept" code-analysis warnings
REVERT: 6586ae390 need gsl::make_span from gsl/span_ext
REVERT: 722089774 remove gsl/mem dependency cycle
REVERT: d741a0761 use gsl::narrow<> instead of static_cast
REVERT: 99eb4b36e get rid of signed/unsigned mismatch compiler warning
REVERT: 814450522 remove more code-analysis diagnostics
REVERT: c8441b309 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: e6d70a9ff last of "const" from code-analysis
REVERT: b8445814a mark a few more things as "const" per code-analysis
REVERT: d18544ec7 don't need to create temporary std::strings
REVERT: ee7faa979 still more code-analysis cleanup
REVERT: 5cd6f864d cleanup more code-analysis diagnostics
REVERT: 492fb0a86 one more compiler warning about implicitly deleted copy/assignment
REVERT: b8f782c88 remove compiler warnings about implicitly deleted copy/assignment/move
REVERT: 14d1d1cb8 #pragma-away warnings from GSL
REVERT: 86c40ea6c assert() to prevent some code-analysis diagnostics
REVERT: 7204517a9 make copy/assignment explicit
REVERT: 3ce824079 reduce code-analysis diagnostics
REVERT: 01e367a56 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 03f3ddde9 proper printf format
REVERT: 877d7dc93 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 5a4a3d575 code-analysis doesn't like C-style casts
REVERT: a3fdae416 code-analysis doesn't like NULL
REVERT: 6309baedc Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: d1194a2fe Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 535b4757d Merge branch 'develop/reduce-compiler-warnings' of github.com:mdaus/coda-oss into develop/reduce-compiler-warnings
REVERT: a60b95d60 "constexpr" can be hard to get right with older C++11 compilers; don't even try
REVERT: c07b5303e Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 04306bbee need at least VS2017 to use the real GSL
REVERT: 796ad820b Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 16c240cd6 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: e07e89f0c turn on "warnings as errors" for CMAKE builds
REVERT: 5c019f891 complex "constexpr" functions not available with our version of g++
REVERT: 4ab074a58 fix a few more compiler warnings ... nearing the end! :-)
REVERT: dea7ea41b And still more compiler warnings ... almost done 🤞🏻
REVERT: fbe3bbb20 remove assorted compiler warnings
REVERT: e60b7fd3c Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: e9df212c6 Arguments should be "const&" to prevent C4866
REVERT: 94e75cbed Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: d3130414a Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 9a5e71f31 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: bd27c0232 Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: c053362d2 remove still more compiler warnings
REVERT: 9f133b85a remove some more compiler warnings
REVERT: 0883c729c Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: f4b766880 avoid comparision between signed/unsigned to prevent compiler warning
REVERT: 1e6564a6e eliminate more compiler warnings
REVERT: 85a7b8ad0 remove a few compiler warnings
REVERT: 09c82049f Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: 31f1662fa Merge branch 'master' into develop/reduce-compiler-warnings
REVERT: a313562a3 Merge branch 'feature/fix-compiler-warnings' into develop/reduce-compiler-warnings
REVERT: 8547cdd24 eliminiate GCC warnings from Filesystem.h
REVERT: b5044b2a2 fix several compiler warnings/code-analysis diagnostics
REVERT: 9d2f90b8c GetEnvironmentVariable() and getenv() aren't quite the same
REVERT: 6faa3666f remove more compiler warnings

git-subtree-dir: externals/coda-oss
git-subtree-split: cbfb20ce2e64635131ed17790d93bd54b78754d6
  • Loading branch information
Dan Smith authored and Dan Smith committed Mar 13, 2023
1 parent 4ee80f7 commit a84786f
Show file tree
Hide file tree
Showing 569 changed files with 6,987 additions and 43,119 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build-cmake-windows:
strategy:
matrix:
os: [windows-latest]
os: [windows-2019]
python-version: ['3.7']
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -77,8 +77,7 @@ jobs:
- name: build
run: |
cd target
# "-j" spawns too many processes causing GCC to crash
cmake --build . -j 12
cmake --build . -j
- name: install
run: |
cd target
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*~
*.pyc
__pycache__/

# Build artifacts

install/
install-*/
target/
Expand All @@ -14,13 +14,13 @@ test_package/build/

# CMake
_deps/
*.cmake
CMakeCache.txt
CMakeFiles/
*_config.h
Makefile
modules/**/Makefile
out/
CMakeSettings.json

# Waf
.waf-*
Expand Down Expand Up @@ -52,5 +52,4 @@ project.sln
**/x64/
*.vcxproj.user

# Unit-tests
TEST_*_TMP.*
CMakeSettings.json
27 changes: 11 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# Author: Scott A. Colcord

cmake_minimum_required(VERSION 3.14)

project(coda-oss)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 11)
set(CXX_STANDARD_REQUIRED true)

if (EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
Expand All @@ -19,23 +20,17 @@ endif()
if (${CMAKE_PROJECT_NAME} STREQUAL coda-oss)
# this is the top level project

# Always turn on "warnings as errors" to avoid lots of (meaningless?) build output;
# we'll dial-back warnings as necessary.
# set up warnings
if (MSVC)
add_compile_options(/WX) # warnings as errors
add_compile_options(/MP) # multi-processor compile

if (ENABLE_ASAN)
# https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-160
add_compile_options(/fsanitize=address)
endif()
# set warning level to /W3
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
elseif (UNIX)
add_compile_options(-Werror) # warnings as errors
if (ENABLE_ASAN)
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()
add_compile_options(
-Wno-deprecated
-Wno-unused-value
-Wno-unused-but-set-variable
)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
Expand Down
38 changes: 10 additions & 28 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,24 @@
```
# coda-oss Release Notes

## [Release 2023-??-??](https://github.com/mdaus/coda-oss/releases/tag/2023-??-??)
* *zlib* updated to [1.2.13](https://github.com/madler/zlib/releases/tag/v1.2.13).
* new `mem::ComplexView` class to make it easier to process complex data stored in parallel.
* adjust compiler flags for clean *CMake* builds.
* wrap common "file open" routines (e.g., `fopen()`) to support `sys::expandEnvironmentVariables()`.
* add header-only [HighFive](https://github.com/BlueBrain/HighFive) HDF5-wrapper library.

## [Release 2022-12-14](https://github.com/mdaus/coda-oss/releases/tag/2022-12-14)
* removed remaining vestiges of `std::auto_ptr`, provide `mem::AutoPtr` for the tiny handful of
places (e.g., SWIG bindings) that still need copying.
* `xml::lite::Element` overloads to make creting new XML documents easier; see unittests for examples.
* try even harder to find unittest files in various scenarios.
* build *hdf5.lite* with **waf**.
* New `--optz=fastest-possible` (**waf** only) which adds
[`-march=native`](https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/x86-Options.html#x86-Options)
to *fastest* for **waf** builds. There is a new *faster* option (the default) which is currently
the same as *fastest* (i.e., no `-march=native`).
## [Release 2023-03-10](https://github.com/mdaus/coda-oss/releases/tag/2023-01-10)
* Final 🤞🏻 **C++11 release from [master](https://github.com/mdaus/coda-oss/tree/master)
not [main](https://github.com/mdaus/coda-oss/tree/main)/C++14** (as releases since
[2022-08-30](https://github.com/mdaus/coda-oss/releases/tag/2022-08-30) have been).
* [HDF5](https://www.hdfgroup.org/) [source code](https://github.com/HDFGroup/hdf5) added (not built).
* *waf* self-extractor rebuilt to fix FIPS warning because of insecure *md5* hashing.
* Better debug/release configurations for *waf* builds.
* Minor tweaks from other projects.

## [Release 2022-11-04](https://github.com/mdaus/coda-oss/releases/tag/2022-11-04)
* "Cut" from [main](https://github.com/mdaus/coda-oss/tree/main), not *master*.
* The [HDFGroup](https://hdfgroup.org/)s [HDF5 library](https://github.com/HDFGroup/hdf5) is built
and installed; a simple (and very incomplete!) wrapper is provided, this is at the "hello world!" stage.
* A few **cli** routines have been tweaked to make unit-testing easier.
* Utilitiy routines for finding various files when unit-testing.
* Removed C++14 work-arounds needed in C++11. Legacy C++ exception specificatons removed.
* Rebuild `waf` for FIPS error; added more debug options.

## [Release 2022-08-30](https://github.com/mdaus/coda-oss/releases/tag/2022-08-30)
* XML is now always written as UTF-8; the code will still try to read Windows-1252.
* `Uri`s are no longer validated by default.
* Minor tweaks from other projects.
* Final C++11 release 🤞🏻; future releases will be C++14 from [main](https://github.com/mdaus/coda-oss/tree/main).
* ~~Final C++11 release 🤞🏻; future releases will be C++14 from [main](https://github.com/mdaus/coda-oss/tree/main).~~

## [Release 2022-08-02](https://github.com/mdaus/coda-oss/releases/tag/2022-08-02)
* remove *Expat* and *libXML* modules and support in **xml.lite**; only *Xerces* was actively used.
* fix `waf` to work-around FIPS warning because of insecure *md5* hashing.
* ~~fix `waf` to work-around FIPS warning because of insecure *md5* hashing.~~
* tweak `str::EncodedStringView` and `str::EncodedString` for
[future XML changes](https://github.com/mdaus/coda-oss/tree/feature/always-write-xml-as-utf8).

Expand Down
37 changes: 18 additions & 19 deletions UnitTest/TestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
#undef TEST_CHECK
#undef TEST_ASSERT
#undef TEST_ASSERT_NULL
#undef TEST_ASSERT_NOT_NULL
#undef TEST_ASSERT_TRUE
#undef TEST_ASSERT_FALSE
#undef TEST_MAIN
#undef TEST_CASE
#define TEST_CHECK(X)
#define TEST_MAIN(X)
#define TEST_ASSERT_NULL(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsNull(X)
#define TEST_ASSERT_NOT_NULL(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsNotNull(X)
#define TEST_ASSERT_TRUE(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue(X)
#define TEST_ASSERT_FALSE(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsFalse(X)
#define TEST_ASSERT_NULL(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsNull((X))
#define TEST_ASSERT_TRUE(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue((X))
#define TEST_ASSERT_FALSE(X) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsFalse((X))
#define TEST_ASSERT(X) TEST_ASSERT_TRUE(X)
#define CODA_OSS_testMethod_(X) testMethod ## _ ## X
#define TEST_CASE(X) TEST_METHOD(X) { CODA_OSS_testMethod_(X)(#X); } void CODA_OSS_testMethod_(X)(std::string testName)
Expand All @@ -32,24 +30,24 @@ namespace test
static void FailOnCondition(bool condition, const unsigned short* message, const Microsoft::VisualStudio::CppUnitTestFramework::__LineInfo* pLineInfo);
static std::wstring GetAssertMessage(bool equality, const std::string& expected, const std::string& actual, const wchar_t *message);
};
#define CODA_OSS_equals_message_(expected, actual, message) reinterpret_cast<const unsigned short*>(test::Assert::GetAssertMessage(true, test::toString(expected), test::toString(actual), message).c_str())
#define CODA_OSS_not_equals_message_(notExpected, actual, message) reinterpret_cast<const unsigned short*>(test::Assert::GetAssertMessage(false, test::toString(notExpected), test::toString(actual), message).c_str())
#define CODA_OSS_equals_message_(expected, actual, message) reinterpret_cast<const unsigned short*>(test::Assert::GetAssertMessage(true, str::toString(expected), str::toString(actual), message).c_str())
#define CODA_OSS_not_equals_message_(notExpected, actual, message) reinterpret_cast<const unsigned short*>(test::Assert::GetAssertMessage(false, str::toString(notExpected), str::toString(actual), message).c_str())
#define CODA_OSS_message_(message) reinterpret_cast<const unsigned short*>(test::Assert::GetAssertMessage(false, "", "", message).c_str())

// see Assert::AreEqual<>
template<typename TExpected, typename TActual>
inline void diePrintf_eq(const TExpected& expected, const TActual& actual,
const wchar_t* message = NULL, const Microsoft::VisualStudio::CppUnitTestFramework::__LineInfo* pLineInfo = NULL)
{
Assert::FailOnCondition(expected == actual, CODA_OSS_equals_message_(expected, actual, message), pLineInfo);
Assert::FailOnCondition(expected == actual, CODA_OSS_equals_message_(expected, actual, message), pLineInfo);
}

// see Assert::AreNotEqual<>
template<typename TExpected, typename TActual>
inline void diePrintf_ne(const TExpected& notExpected, const TActual& actual,
const wchar_t* message = NULL, const Microsoft::VisualStudio::CppUnitTestFramework::__LineInfo* pLineInfo = NULL)
{
Assert::FailOnCondition(notExpected != actual, CODA_OSS_not_equals_message_(notExpected, actual, message), pLineInfo);
Assert::FailOnCondition(notExpected != actual, CODA_OSS_not_equals_message_(notExpected, actual, message), pLineInfo);
}

template <typename TX1, typename TX2>
Expand Down Expand Up @@ -80,22 +78,22 @@ inline void diePrintf_lt(const TX1& X1, const TX2& X2,
}
#undef CODA_OSS_test_diePrintf_eq_
#undef CODA_OSS_test_diePrintf_not_eq_
#define CODA_OSS_test_diePrintf_eq_(X1, X2) testName, ::test::diePrintf_eq(X1, X2)
#define CODA_OSS_test_diePrintf_not_eq_(X1, X2) testName, ::test::diePrintf_ne(X1, X2)
#define CODA_OSS_test_diePrintf_eq_(X1, X2) testName, test::diePrintf_eq(X1, X2)
#define CODA_OSS_test_diePrintf_not_eq_(X1, X2) testName, test::diePrintf_ne(X1, X2)

#undef CODA_OSS_test_diePrintf_greater_eq_
#undef CODA_OSS_test_diePrintf_greater_
#undef CODA_OSS_test_diePrintf_lesser_eq_
#undef CODA_OSS_test_diePrintf_lesser_
#define CODA_OSS_test_diePrintf_greater_eq_(X1, X2) testName, ::test::diePrintf_ge(X1, X2)
#define CODA_OSS_test_diePrintf_greater_(X1, X2) testName, ::test::diePrintf_gt(X1, X2)
#define CODA_OSS_test_diePrintf_lesser_eq_(X1, X2) testName, ::test::diePrintf_le(X1, X2)
#define CODA_OSS_test_diePrintf_lesser_(X1, X2) testName, ::test::diePrintf_lt(X1, X2)
#define CODA_OSS_test_diePrintf_greater_eq_(X1, X2) testName, test::diePrintf_ge(X1, X2)
#define CODA_OSS_test_diePrintf_greater_(X1, X2) testName, test::diePrintf_gt(X1, X2)
#define CODA_OSS_test_diePrintf_lesser_eq_(X1, X2) testName, test::diePrintf_le(X1, X2)
#define CODA_OSS_test_diePrintf_lesser_(X1, X2) testName, test::diePrintf_lt(X1, X2)

template <typename TX1, typename TX2>
inline void test_assert_greater_(const TX1& X1, const TX2& X2)
{
Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue(X1 > X2);
Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue(X1 > X2);
}
#undef TEST_ASSERT_GREATER
#define TEST_ASSERT_GREATER(X1, X2) testName, test_assert_greater_(X1, X2)
Expand Down Expand Up @@ -126,13 +124,14 @@ inline void assert_almost_eq(const std::string& testName, long double X1, long d
#undef TEST_ASSERT_EQ_MSG
#define TEST_ASSERT_EQ_MSG(msg, X1, X2) testName, Microsoft::VisualStudio::CppUnitTestFramework::Logger::WriteMessage(msg.c_str()); TEST_ASSERT_EQ(X1, X2)

#undef TEST_FAIL_MSG
#define TEST_FAIL_MSG(msg) { (void)testName; const str::EncodedStringView vw(msg); Microsoft::VisualStudio::CppUnitTestFramework::Assert::Fail(vw.wstring().c_str()); }
#undef TEST_FAIL
#define TEST_FAIL(msg) { (void)testName; const str::EncodedStringView vw(msg); Microsoft::VisualStudio::CppUnitTestFramework::Assert::Fail(vw.wstring().c_str()); }

#undef TEST_EXCEPTION
#undef TEST_THROWS
#undef TEST_SPECIFIC_EXCEPTION
#define TEST_EXCEPTION(X) (void)testName; try{ (X); TEST_FAIL(#X " should have thrown."); } CODA_OSS_TEST_EXCEPTION_catch_
#define TEST_EXCEPTION(X) (void)testName; try{ (X); TEST_FAIL(#X " should have thrown."); } \
catch (const except::Throwable&){ TEST_ASSERT_TRUE(true); } catch (const except::Throwable11&){ TEST_ASSERT_TRUE(true); }
#define TEST_THROWS(X) (void)testName; try{ (X); TEST_FAIL(#X " should have thrown."); } catch (...){ TEST_ASSERT_TRUE(true); }
#define TEST_SPECIFIC_EXCEPTION(X, Y) testName, Microsoft::VisualStudio::CppUnitTestFramework::Assert::ExpectException<Y>([&](){(X);})

18 changes: 4 additions & 14 deletions UnitTest/UnitTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,16 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<EnableASAN>true</EnableASAN>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<EnableASAN>true</EnableASAN>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -66,13 +64,10 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatWarningAsError>true</TreatWarningAsError>
<ControlFlowGuard>Guard</ControlFlowGuard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<TranslateIncludes>true</TranslateIncludes>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<TranslateIncludes>true</TranslateIncludes>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -93,11 +88,6 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ControlFlowGuard>Guard</ControlFlowGuard>
<TranslateIncludes>true</TranslateIncludes>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
31 changes: 20 additions & 11 deletions UnitTest/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,45 @@
// add headers that you want to pre-compile here

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#pragma warning(push)
#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior
#include <WinSock.h>
#include <windows.h>
#include <comdef.h>
#pragma warning(pop)
#undef min
#undef max

#define _USE_MATH_DEFINES
#include <math.h>
#include <assert.h>

#include "import/std.h"

#include <typeinfo>
#include <locale>
#include <limits>
#include <iterator>
#include <array>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <fstream>
#include <sstream>
#include <std/string>
#include <std/span>
#include <std/optional>
#include <std/cstddef>
#include <std/bit>
#include <std/filesystem>
#include <algorithm>
#include <std/bit> // std::endian
#include <std/cstddef>
#include <numeric> // std::accumulate
#include <std/filesystem>
#include <future>
#include <cassert>
#include <tuple>

#include "CppUnitTest.h"

#include "coda_oss/span.h"
#include "gsl/gsl.h"
#include "import/sys.h"
#include "import/math.h"
Expand All @@ -44,8 +57,6 @@
#include "import/except.h"
#include "import/mem.h"
#include <mem/SharedPtr.h>
#include <mem/AutoPtr.h>
#include <mem/ComplexView.h>
#include "import/cli.h"
#include "polygon/DrawPolygon.h"
#include "polygon/PolygonMask.h"
Expand Down Expand Up @@ -74,7 +85,6 @@
#include <sys/Runnable.h>
#include <sys/Thread.h>
#include <sys/Mutex.h>
#include <sys/FileFinder.h>
#include <import/sys.h>
#include <import/math/linear.h>
#include <import/math/poly.h>
Expand All @@ -92,7 +102,6 @@
#include <logging/ExceptionLogger.h>
#include <import/logging.h>
#include <import/re.h>
#include "io/StringStream.h"

#include "TestCase.h"

Expand Down
Loading

0 comments on commit a84786f

Please sign in to comment.