Skip to content

Commit

Permalink
Squashed 'externals/nitro/' changes from e1a64da1f..c8ecbe9ae
Browse files Browse the repository at this point in the history
c8ecbe9ae Merge commit '55a407b04834573e5d6a1a1fb43d8c6a77608c06'
55a407b04 Squashed 'externals/coda-oss/' changes from ab45464820..e87c32b4de
4fa700ed2 merge 'master'
6b9d2bac1 Merge branch 'master'
9ae5fec7d update to 'main'
342f55276 NITRO 2.10.13 (#542)
f0cc26bdd latest from coda-oss (#540)
7d77233db latest from coda-oss (#536)
437978da8 latest from coda-oss (#535)
eea09a38d latest from coda-oss (#534)
e2f038e45 adjust compiler flags for clean CMake builds (#533)
b871d2b9c latest from coda-oss (#532)
e8ff6b444 apps: fix display of TREs from file extended header section (#529)
463c9e418 latest from coda-oss (#531)
24ff32863 -j 6 seems to work for SIX, how about NITRO?
713ee8538 -j 6 seems to work for SIX, how about NITRO?
4ccdf5b37 latest from coda-oss (#527)
c71acc492 latest from coda-oss (#526)
08cbb96f9 build with older C++14 compilers (#524)

git-subtree-dir: externals/nitro
git-subtree-split: c8ecbe9aeff9af801df2a9d56922b6d8b8486854
  • Loading branch information
Dan Smith authored and Dan Smith committed Mar 13, 2023
1 parent 51536c1 commit 99bf76e
Show file tree
Hide file tree
Showing 479 changed files with 38,832 additions and 1,014 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/frequent_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: make
run: |
cd build
cmake --build . --config Release -j 2
cmake --build . --config Release -j
cmake --build . --config Release --target install
- name: test
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
run: |
cd build
# using the default number of threads (-j) causes G++ to crash
cmake --build . -j 2
cmake --build . -j 6
cmake --build . --target install
- name: test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
cd build
# using the default number of threads (-j) causes G++ to crash
cmake --build . -j 2
cmake --build . -j 6
cmake --build . --target install
- name: test
run: |
Expand Down
38 changes: 15 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,23 @@ set(CXX_STANDARD_REQUIRED true)
if (${CMAKE_PROJECT_NAME} STREQUAL nitro)
# we are the top-level project and are responsible for configuration

# set up warnings
# Always turn on "warnings as errors" to avoid lots of (meaningless?) build output;
# we'll dial-back warnings as necessary.
if (MSVC)
# set warning level to /W4
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
add_compile_options(/W4)
add_compile_options(/wd4100) # '...': unreferenced formal parameter
add_compile_options(/wd4127) # conditional expression is constant
if (ENABLE_ASAN)
# https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-160
add_compile_options(/fsanitize=address)
endif()
add_compile_options(/std:c++14)
add_compile_options(/WX) # warnings as errors

if (ENABLE_ASAN)
# https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-160
add_compile_options(/fsanitize=address)
endif()

elseif (UNIX)
add_compile_options(
-Wall
-Wno-deprecated
-Wno-unused-value
-Wno-unused-but-set-variable
)
if (ENABLE_ASAN)
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
add_compile_options(-fsanitize=address)
endif()
add_compile_options(-std=c++14)
add_compile_options(-Werror) # warnings as errors

if (ENABLE_ASAN)
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
add_compile_options(-fsanitize=address)
endif()
endif()

if (EXISTS "${CMAKE_BINARY_DIR}/conan_paths.cmake")
Expand Down
2 changes: 1 addition & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ except that C++14 is now required. [master](https://github.com/mdaus/nitro/tree
* [coda-oss](https://github.com/mdaus/coda-oss) release [2022-08-30](https://github.com/mdaus/coda-oss/releases/tag/2022-08-30)
* Build JPEG decompression as a plug-in.
* tweak unittests so they run in SIX.
* Final C++11 release 🤞🏻; future releases will be C++14 from [main](https://github.com/mdaus/nitro/tree/main).
* ~~Final C++11 release 🤞🏻; future releases will be C++14 from [main](https://github.com/mdaus/nitro/tree/main).~~

## [Version 2.10.11](https://github.com/mdaus/nitro/releases/tag/NITRO-2.10.11); August 2, 2022
* [coda-oss](https://github.com/mdaus/coda-oss) release [2022-08-02](https://github.com/mdaus/coda-oss/releases/tag/2022-08-02)
Expand Down
2 changes: 1 addition & 1 deletion copy_externals.csh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/csh -f

rm -r -f tmp && mkdir tmp && cd tmp
git clone -b main [email protected]:mdaus/coda-oss.git
git clone --depth 1 -b main [email protected]:mdaus/coda-oss.git
rm -r -f coda-oss/.git

cd ..
Expand Down
6 changes: 4 additions & 2 deletions externals/coda-oss/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*~
*.pyc
__pycache__/
# Build artifacts

# Build artifacts
install/
install-*/
target/
Expand All @@ -20,6 +20,7 @@ CMakeFiles/
Makefile
modules/**/Makefile
out/
CMakeSettings.json

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

CMakeSettings.json
# Unit-tests
TEST_*_TMP.*
30 changes: 16 additions & 14 deletions externals/coda-oss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
# Author: Scott A. Colcord

cmake_minimum_required(VERSION 3.14)
project(coda-oss)

set(TARGET_LANGUAGE c++)
set(CMAKE_CXX_STANDARD 14)
set(CXX_STANDARD_REQUIRED true)

project(coda-oss)

if (EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
# build and package with conan
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
Expand All @@ -21,19 +19,23 @@ endif()
if (${CMAKE_PROJECT_NAME} STREQUAL coda-oss)
# this is the top level project

# set up warnings
# Always turn on "warnings as errors" to avoid lots of (meaningless?) build output;
# we'll dial-back warnings as necessary.
if (MSVC)
# 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}")
add_compile_options(/std:c++14)
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()
elseif (UNIX)
add_compile_options(
-Wno-deprecated
-Wno-unused-value
-Wno-unused-but-set-variable
)
add_compile_options(-std=c++14)
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()
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
Expand Down
15 changes: 11 additions & 4 deletions externals/coda-oss/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@
```
# 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 vestigates of `std::auto_ptr`, provide `mem::AutoPtr` for the tiny handful of
* 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.
Expand All @@ -30,16 +37,16 @@
* 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
18 changes: 14 additions & 4 deletions externals/coda-oss/UnitTest/UnitTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<EnableASAN>true</EnableASAN>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<EnableASAN>true</EnableASAN>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -64,10 +66,13 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatWarningAsError>true</TreatWarningAsError>
<ControlFlowGuard>Guard</ControlFlowGuard>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<ConformanceMode>true</ConformanceMode>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<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 All @@ -88,6 +93,11 @@
<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
29 changes: 9 additions & 20 deletions externals/coda-oss/UnitTest/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,32 @@
// 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 <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 "import/std.h"

#include <std/string>
#include <std/span>
#include <std/optional>
#include <std/cstddef>
#include <std/bit>
#include <algorithm>
#include <std/bit> // std::endian
#include <std/cstddef>
#include <numeric> // std::accumulate
#include <std/filesystem>
#include <future>
#include <cassert>
#include <tuple>
#include <std/bit> // std::endian

#include "CppUnitTest.h"

#include "coda_oss/span.h"
#include "gsl/gsl.h"
#include "import/sys.h"
#include "import/math.h"
Expand All @@ -58,6 +45,7 @@
#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 @@ -104,6 +92,7 @@
#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 99bf76e

Please sign in to comment.