diff --git a/externals/coda-oss/.gitignore b/externals/coda-oss/.gitignore
index 7489cb720..8549527fe 100644
--- a/externals/coda-oss/.gitignore
+++ b/externals/coda-oss/.gitignore
@@ -53,4 +53,4 @@ project.sln
*.vcxproj.user
# Unit-tests
-TEST_*_TMP.*
+TEST_*_TMP*.*
diff --git a/externals/coda-oss/UnitTest/UnitTest.vcxproj b/externals/coda-oss/UnitTest/UnitTest.vcxproj
index acd9a5bbe..65fb191b7 100644
--- a/externals/coda-oss/UnitTest/UnitTest.vcxproj
+++ b/externals/coda-oss/UnitTest/UnitTest.vcxproj
@@ -57,7 +57,7 @@
Use
Level4
true
- $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;%(AdditionalIncludeDirectories)
+ $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\hdf5.lite\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;$(SolutionDir)modules\c++\zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;%(AdditionalIncludeDirectories)
_DEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
true
pch.h
@@ -71,10 +71,11 @@
true
true
/Zc:__cplusplus %(AdditionalOptions)
+ AdvancedVectorExtensions2
Windows
- $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)
+ $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)
@@ -84,7 +85,7 @@
true
true
true
- $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;%(AdditionalIncludeDirectories)
+ $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\hdf5.lite\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;$(SolutionDir)modules\c++\zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;%(AdditionalIncludeDirectories)
NDEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
true
pch.h
@@ -96,12 +97,13 @@
true
true
/Zc:__cplusplus %(AdditionalOptions)
+ AdvancedVectorExtensions2
Windows
true
true
- $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)
+ $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)
@@ -113,6 +115,18 @@
true
true
+
+ true
+ true
+
+
+ true
+ true
+
+
+ true
+ true
+
true
true
@@ -341,9 +355,14 @@
true
true
+
+ true
+ true
+
+
@@ -361,6 +380,7 @@
+
diff --git a/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters b/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters
index fd7344987..c4c85031c 100644
--- a/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters
+++ b/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters
@@ -225,6 +225,24 @@
types
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ zip
+
+
+ zip
+
@@ -276,5 +294,11 @@
{d205c017-7e98-456f-923f-2f78870a3d7d}
+
+ {5997a3de-0dc5-4439-b068-b351c5f395e3}
+
+
+ {223c163f-0321-4935-8e20-0e05f048adf0}
+
\ No newline at end of file
diff --git a/externals/coda-oss/UnitTest/hdf5.lite.cpp b/externals/coda-oss/UnitTest/hdf5.lite.cpp
new file mode 100644
index 000000000..6546a2f00
--- /dev/null
+++ b/externals/coda-oss/UnitTest/hdf5.lite.cpp
@@ -0,0 +1,25 @@
+#include "pch.h"
+#include "CppUnitTest.h"
+
+#include
+#include
+#include
+#include
+#include
+
+namespace hdf5_lite
+{
+
+TEST_CLASS(test_hdf5info){ public:
+#include "hdf5.lite/unittests/test_hdf5info.cpp"
+};
+
+TEST_CLASS(test_hdf5read){ public:
+#include "hdf5.lite/unittests/test_hdf5read.cpp"
+};
+
+TEST_CLASS(test_hdf5write){ public:
+#include "hdf5.lite/unittests/test_hdf5write.cpp"
+};
+
+}
\ No newline at end of file
diff --git a/externals/coda-oss/UnitTest/pch.h b/externals/coda-oss/UnitTest/pch.h
index 3ee1dd19e..14807bb81 100644
--- a/externals/coda-oss/UnitTest/pch.h
+++ b/externals/coda-oss/UnitTest/pch.h
@@ -97,6 +97,8 @@
#include
#include
#include "io/StringStream.h"
+#include
+#include
#include "TestCase.h"
diff --git a/externals/coda-oss/UnitTest/zip.cpp b/externals/coda-oss/UnitTest/zip.cpp
new file mode 100644
index 000000000..b9fc79389
--- /dev/null
+++ b/externals/coda-oss/UnitTest/zip.cpp
@@ -0,0 +1,12 @@
+#include "pch.h"
+#include "CppUnitTest.h"
+
+#include
+
+namespace zip
+{
+TEST_CLASS(unittest_GZip){ public:
+#include "zip/unittests/unittest_GZip.cpp"
+};
+
+}
\ No newline at end of file
diff --git a/externals/coda-oss/build/build.py b/externals/coda-oss/build/build.py
index e9fd0ecde..1c9c5eca2 100644
--- a/externals/coda-oss/build/build.py
+++ b/externals/coda-oss/build/build.py
@@ -852,7 +852,7 @@ def configureCompilerOptions(self):
config['cxx']['optz_fast'] = '-O2'
config['cxx']['optz_faster'] = '-O3'
config['cxx']['optz_fastest'] = config['cxx']['optz_faster']
- config['cxx']['optz_fastest-possible'] = config['cxx']['optz_fastest'] # TODO: -march=native ?
+ config['cxx']['optz_fastest-possible'] = config['cxx']['optz_fastest']
#self.env.append_value('LINKFLAGS', '-fPIC -dynamiclib'.split())
self.env.append_value('LINKFLAGS', '-fPIC'.split())
@@ -907,10 +907,11 @@ def configureCompilerOptions(self):
# https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/x86-Options.html#x86-Options
# "Using -march=native enables all instruction subsets supported by the local machine ..."
config['cxx']['optz_faster'] = '-O3' # no -march=native
- config['cxx']['optz_fastest'] = config['cxx']['optz_faster'] # TODO: add -march=native ?
+ # Haswell is from 2013 ... 10 years ago: https://en.wikipedia.org/wiki/Haswell_%28microarchitecture%29
+ config['cxx']['optz_fastest'] = [ config['cxx']['optz_faster'], '-march=haswell' ]
# This "should" be part of fastest, but that could cause unexpected floating point differences.
# The "fastest-possible" option is new; see comments above.
- config['cxx']['optz_fastest-possible'] = [ config['cxx']['optz_fastest'], '-march=native' ]
+ config['cxx']['optz_fastest-possible'] = [ config['cxx']['optz_faster'], '-march=native' ] # -march=native instead of haswell
self.env.append_value('CXXFLAGS', '-fPIC'.split())
if not Options.options.enablecpp17:
@@ -956,10 +957,11 @@ def configureCompilerOptions(self):
# https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/x86-Options.html#x86-Options
# "Using -march=native enables all instruction subsets supported by the local machine ..."
config['cc']['optz_faster'] = '-O3' # no -march=native
- config['cc']['optz_fastest'] = config['cc']['optz_faster'] # TODO: add -march=native ?
+ # Haswell is from 2013 ... 10 years ago: https://en.wikipedia.org/wiki/Haswell_%28microarchitecture%29
+ config['cc']['optz_fastest'] = [ config['cc']['optz_faster'], '-march=haswell' ]
# This "should" be part of fastest, but that could cause unexpected floating point differences.
# The "fastest-possible" option is new; see comments above.
- config['cc']['optz_fastest-possible'] = [ config['cc']['optz_fastest'], '-march=native' ]
+ config['cc']['optz_fastest-possible'] = [ config['cc']['optz_faster'], '-march=native' ] # -march=native instead of haswell
self.env.append_value('CFLAGS', '-fPIC'.split())
# "gnu99" enables POSIX and BSD
diff --git a/externals/coda-oss/build/dumplibimpl.py b/externals/coda-oss/build/dumplibimpl.py
index d88864c87..4ebaff853 100644
--- a/externals/coda-oss/build/dumplibimpl.py
+++ b/externals/coda-oss/build/dumplibimpl.py
@@ -56,7 +56,8 @@ def dumpLibImpl(context, raw):
# We need a source file here so it doesn't think it is headers only
topDir = context.top_dir
- buildDir = os.path.dirname(os.path.realpath(__file__))
+ buildDir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ '__pycache__')
modArgs['SOURCE_DIR'] = os.path.relpath(buildDir, topDir)
modArgs['SOURCE_EXT'] = 'pyc'
context.module(**modArgs)
diff --git a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj b/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj
index ca8e29c77..7165b8b15 100644
--- a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj
+++ b/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj
@@ -43,6 +43,14 @@
+
+
+
+
+
+
+
+
@@ -266,6 +274,12 @@
+
+
+
+
+
+
@@ -274,6 +288,11 @@
+
+
+
+
+
@@ -392,6 +411,11 @@
+
+
+
+
+
@@ -461,7 +485,7 @@
true
_DEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
pch.h
- cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\
+ cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;hdf5.lite\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\;zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\
Use
pch.h
true
@@ -474,11 +498,14 @@
true
/Zc:__cplusplus %(AdditionalOptions)
true
+ AdvancedVectorExtensions2
true
+ $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\
+ hdf5-c++.lib;z.lib;minizip.lib;%(AdditionalDependencies)
@@ -489,7 +516,7 @@
true
NDEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
pch.h
- cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\
+ cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;hdf5.lite\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\;zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\
Use
pch.h
true
@@ -500,6 +527,7 @@
true
true
/Zc:__cplusplus %(AdditionalOptions)
+ AdvancedVectorExtensions2
@@ -507,6 +535,8 @@
true
true
true
+ $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\
+ hdf5-c++.lib;z.lib;minizip.lib;%(AdditionalDependencies)
diff --git a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters b/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters
index 05fb54dc3..e1e9675be 100644
--- a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters
+++ b/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters
@@ -753,6 +753,48 @@
coda_oss
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
@@ -1095,6 +1137,36 @@
sys
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ hdf5.lite
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
+
+ zip
+
@@ -1169,6 +1241,12 @@
{387bc6cb-323a-42b3-8502-4fac72586d12}
+
+ {e4db8b19-0870-4cb2-af64-14b928c68725}
+
+
+ {a2682912-3963-489a-9cf0-c5224b27eb84}
+
diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/HDF5Exception.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/HDF5Exception.h
index 83fd276bb..463b8bf86 100644
--- a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/HDF5Exception.h
+++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/HDF5Exception.h
@@ -20,6 +20,7 @@
*
*/
+#pragma once
#ifndef CODA_OSS_hdf5_lite_HDF5Exception_h_INCLUDED_
#define CODA_OSS_hdf5_lite_HDF5Exception_h_INCLUDED_
@@ -52,4 +53,5 @@ CODA_OSS_DECLARE_EXTENDED_EXCEPTION(DataType, hdf5::lite::HDF5Exception);
}
}
+
#endif // CODA_OSS_hdf5_lite_HDF5Exception_h_INCLUDED_
diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Info.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Info.h
index ee62c137d..145741f86 100644
--- a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Info.h
+++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Info.h
@@ -20,9 +20,9 @@
*
*/
+#pragma once
#ifndef CODA_OSS_hdf5_lite_Info_h_INCLUDED_
#define CODA_OSS_hdf5_lite_Info_h_INCLUDED_
-#pragma once
#include
#include
diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Read.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Read.h
index 09a8502ee..72498652f 100644
--- a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Read.h
+++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Read.h
@@ -20,9 +20,9 @@
*
*/
+#pragma once
#ifndef CODA_OSS_hdf5_lite_Read_h_INCLUDED_
#define CODA_OSS_hdf5_lite_Read_h_INCLUDED_
-#pragma once
/*!
* \file Read.h
diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Write.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Write.h
index dea204a7f..536d74fa3 100644
--- a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Write.h
+++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/Write.h
@@ -20,11 +20,11 @@
*
*/
+#pragma once
#ifndef CODA_OSS_hdf5_lite_Write_h_INCLUDED_
#define CODA_OSS_hdf5_lite_Write_h_INCLUDED_
-#pragma once
-/*!
+ /*!
* \file Write.h
* \brief HDF File-writing API
*
@@ -48,6 +48,9 @@ namespace lite
{
template // currently implemented for float and double
CODA_OSS_API void createFile(const coda_oss::filesystem::path&, const std::string& ds, const types::RowCol&);
+template<> CODA_OSS_API void createFile(const coda_oss::filesystem::path&, const std::string& ds, const types::RowCol&);
+template<> CODA_OSS_API void createFile(const coda_oss::filesystem::path&, const std::string& ds, const types::RowCol&);
+
CODA_OSS_API void createFile(const coda_oss::filesystem::path&, const std::string& ds, SpanRC);
inline void createFile(const coda_oss::filesystem::path& path, const std::string& ds, SpanRC data_)
{
diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h
index d6f525ff6..99f9f0d08 100644
--- a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h
+++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h
@@ -20,9 +20,9 @@
*
*/
+#pragma once
#ifndef CODA_OSS_hdf5_lite_highfive_h_INCLUDED_
#define CODA_OSS_hdf5_lite_highfive_h_INCLUDED_
-#pragma once
/*!
* \file highfive.h
diff --git a/externals/coda-oss/modules/c++/io/include/io/FileOutputStreamOS.h b/externals/coda-oss/modules/c++/io/include/io/FileOutputStreamOS.h
index 5347f4c43..b8e70b893 100644
--- a/externals/coda-oss/modules/c++/io/include/io/FileOutputStreamOS.h
+++ b/externals/coda-oss/modules/c++/io/include/io/FileOutputStreamOS.h
@@ -26,6 +26,8 @@
#include
+#include "config/Exports.h"
+
#if !defined(USE_IO_STREAMS)
#include "io/SeekableStreams.h"
@@ -55,8 +57,7 @@ namespace io
* This class corresponds closely to its java namesake.
* It uses native file handles to make writes.
*/
-class FileOutputStreamOS : public SeekableOutputStream
-
+class CODA_OSS_API FileOutputStreamOS : public SeekableOutputStream
{
protected:
sys::File mFile;
diff --git a/externals/coda-oss/modules/c++/io/include/io/ReadUtils.h b/externals/coda-oss/modules/c++/io/include/io/ReadUtils.h
index 4d16a06d9..c4862a10d 100644
--- a/externals/coda-oss/modules/c++/io/include/io/ReadUtils.h
+++ b/externals/coda-oss/modules/c++/io/include/io/ReadUtils.h
@@ -20,12 +20,14 @@
*
*/
+#pragma once
#ifndef CODA_OSS_io_ReadUtils_h_INCLUDED_
#define CODA_OSS_io_ReadUtils_h_INCLUDED_
#include
#include
+#include
#include
#include // byte
#include
@@ -40,9 +42,8 @@ namespace io
* \param pathname Pathname of the file to read in
* \param buffer Raw bytes of the file
*/
-void readFileContents(const std::string& pathname,
- std::vector& buffer);
-void readFileContents(const coda_oss::filesystem::path& pathname, std::vector& buffer);
+CODA_OSS_API void readFileContents(const std::string& pathname, std::vector& buffer);
+CODA_OSS_API void readFileContents(const coda_oss::filesystem::path& pathname, std::vector& buffer);
/*!
* Reads the contents of a file into a string. The file is assumed to be a
@@ -51,7 +52,7 @@ void readFileContents(const coda_oss::filesystem::path& pathname, std::vector
+
#include
#include
diff --git a/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h b/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h
index 3c8a6b0e6..8457c16b6 100644
--- a/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h
+++ b/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h
@@ -46,6 +46,23 @@
*/
namespace sys
{
+
+/*!
+ * \class SIMDInstructionSet
+ * \brief List of available SIMD instruction sets.
+ *
+ * We require at least SSE2 which is from 2000 ... 23 years ago.
+ * Also see https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
+ * "... For the x86-64 compiler, these extensions [ -msse2 ] are enabled by default."
+* We're 64-bit only.
+ */
+enum class SIMDInstructionSet
+{
+ SSE2, // https://en.wikipedia.org/wiki/SSE2
+ AVX2, // https://en.wikipedia.org/wiki/Advanced_Vector_Extensions
+ AVX512F, // https://en.wikipedia.org/wiki/AVX-512
+};
+
/*!
* \class AbstractOS
* \brief Interface for system independent function calls
@@ -283,6 +300,13 @@ struct CODA_OSS_API AbstractOS
virtual void getAvailableCPUs(std::vector& physicalCPUs,
std::vector& htCPUs) const = 0;
+
+ /*!
+ * Figure out what SIMD instrunctions are available. Keep in mind these
+ * are RUN-TIME, not compile-time, checks.
+ */
+ virtual SIMDInstructionSet getSIMDInstructionSet() const = 0;
+
/*!
* Create a symlink, pathnames can be either absolute or relative
*/
diff --git a/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h b/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h
index 96bfb098f..acd05b980 100644
--- a/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h
+++ b/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h
@@ -21,14 +21,13 @@
*
*/
-
+#pragma once
#ifndef CODA_OSS_sys_Dbg_h_INCLUDED_
#define CODA_OSS_sys_Dbg_h_INCLUDED_
-#pragma once
-
-#include "config/Exports.h"
-#include "config/disable_compiler_warnings.h"
+//
+// The macros below may #define NDEBUG, do them before #including
+//
// A "debug" build has debugging symbols, detailed call stacks, minimal optimization, STL validation, etc.
// A "release" build is likely to "run fast" and be "shipped;" it might lack much of what is in a "debug" build.
#ifndef CODA_OSS_DEBUG
@@ -44,8 +43,8 @@
#endif
#endif // _MSC_VER
- // GCC has a "neither" mode with no flags; no -O (optimization) and no -g (debugging);
- // that doesn't seem very useful, so try to figure out something that makes sense.
+ // GCC has a "neither" mode with no flags: no `-O` (optimization) and no `-g` (debugging).
+ // That doesn't seem very useful, so try to figure out something that makes sense.
#if defined(__GNUC__)
// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros
// https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html#debug_mode.using.mode
@@ -71,7 +70,7 @@
#ifndef NDEBUG
//#error "NDEBUG should be #define'd with __OPTIMIZE__"
#endif
- #define CODA_OSS_DEBUG 0
+ #define CODA_OSS_DEBUG 0 // i.e., release
#else
#error "Can't #define CODA_OSS_DEBUG for __GNUC__."
#endif
@@ -92,12 +91,25 @@
#error CODA_OSS_DEBUG is not set.
#endif
+// #define NDEBUG if not already done
+#if CODA_OSS_DEBUG && defined(NDEBUG)
+ #error "NDEBUG and CODA_OSS_DEBUG=1"
+#endif
+#if !defined(NDEBUG) && !CODA_OSS_DEBUG
+ #define NDEBUG
+#endif
+
+#include // *after* NDEBUG, above
#include
#include
-#include
+
+#include
#include
#include
+#include "config/Exports.h"
+#include "config/disable_compiler_warnings.h"
+
namespace sys
{
diff --git a/externals/coda-oss/modules/c++/sys/include/sys/FileFinder.h b/externals/coda-oss/modules/c++/sys/include/sys/FileFinder.h
index be9ae0bcf..0485de3c8 100644
--- a/externals/coda-oss/modules/c++/sys/include/sys/FileFinder.h
+++ b/externals/coda-oss/modules/c++/sys/include/sys/FileFinder.h
@@ -28,6 +28,7 @@
#include
#include
+#include "config/Exports.h"
#include "sys/filesystem.h"
namespace sys
@@ -191,9 +192,10 @@ namespace test // i.e., sys::test
// e.g., root / "externals" / [name] / path / file
//
// Once modulePath is found, the result is cached to avoid searching again.
- coda_oss::filesystem::path findModuleFile(const coda_oss::filesystem::path& root,
+ coda_oss::filesystem::path findModuleFile(
+ const coda_oss::filesystem::path& root,
const std::string& externalsName, const coda_oss::filesystem::path& modulePath, const coda_oss::filesystem::path& moduleFile);
- coda_oss::filesystem::path findGITModuleFile( // use current_directory() to find_dotGITDirectory()
+ CODA_OSS_API coda_oss::filesystem::path findGITModuleFile( // use current_directory() to find_dotGITDirectory()
const std::string& externalsName, const coda_oss::filesystem::path& modulePath, const coda_oss::filesystem::path& moduleFile);
}
}
diff --git a/externals/coda-oss/modules/c++/sys/include/sys/OSUnix.h b/externals/coda-oss/modules/c++/sys/include/sys/OSUnix.h
index eb1a52dd3..f92e596ee 100644
--- a/externals/coda-oss/modules/c++/sys/include/sys/OSUnix.h
+++ b/externals/coda-oss/modules/c++/sys/include/sys/OSUnix.h
@@ -201,6 +201,12 @@ struct OSUnix final : public AbstractOS
virtual void getAvailableCPUs(std::vector& physicalCPUs,
std::vector& htCPUs) const override;
+ /*!
+ * Figure out what SIMD instrunctions are available. Keep in mind these
+ * are RUN-TIME, not compile-time, checks.
+ */
+ SIMDInstructionSet getSIMDInstructionSet() const override;
+
/*!
* Create a symlink, pathnames can be either absolute or relative
*/
diff --git a/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h b/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h
index 7fc5fdf97..ffba1f30b 100644
--- a/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h
+++ b/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h
@@ -226,6 +226,12 @@ struct CODA_OSS_API OSWin32 final : public AbstractOS
virtual void getAvailableCPUs(std::vector& physicalCPUs,
std::vector& htCPUs) const;
+ /*!
+ * Figure out what SIMD instrunctions are available. Keep in mind these
+ * are RUN-TIME, not compile-time, checks.
+ */
+ SIMDInstructionSet getSIMDInstructionSet() const override;
+
/*!
* Create a symlink, pathnames can be either absolute or relative
*/
diff --git a/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp b/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp
index ede2d6cce..773067c1b 100644
--- a/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp
+++ b/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp
@@ -360,6 +360,34 @@ static std::string getSpecialEnv_Platform(const AbstractOS&, const std::string&
#endif
}
+// https://stackoverflow.com/questions/13794130/visual-studio-how-to-check-used-c-platform-toolset-programmatically
+static std::string getSpecialEnv_PlatformToolset(const AbstractOS&, const std::string& envVar)
+{
+ assert(envVar == "PlatformToolset");
+ #if _MSC_VER
+ UNREFERENCED_PARAMETER(envVar);
+ #endif
+
+#ifdef _WIN32
+ // https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset?view=msvc-160
+ // https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
+ #if _MSC_VER >= 1930
+ return "v143"; // Visual Studio 2022
+ #elif _MSC_VER >= 1920
+ return "v142"; // Visual Studio 2019
+ #elif _MSC_VER >= 1910
+ return "v141"; // Visual Studio 2017
+ #elif _MSC_VER >= 1900
+ return "v140"; // Visual Studio 2015
+ #else
+ #error "Don't know $(PlatformToolset) value.'"
+ #endif
+#else
+ // Linux
+ return "";
+#endif
+}
+
static std::string getSpecialEnv_SECONDS_()
{
// https://en.cppreference.com/w/cpp/chrono/c/difftime
@@ -399,6 +427,7 @@ static const std::map s_get_env{
// c.f., Visual Studio
{"Configuration", getSpecialEnv_Configuration},
{"Platform", getSpecialEnv_Platform},
+ {"PlatformToolset", getSpecialEnv_PlatformToolset},
};
bool AbstractOS::isSpecialEnv(const std::string& envVar) const
{
diff --git a/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp b/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp
index e44d9a380..355245e3b 100644
--- a/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp
+++ b/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp
@@ -29,6 +29,7 @@
#include
#include
#include
+#include
#include "sys/Conf.h"
@@ -420,6 +421,27 @@ void sys::OSUnix::getAvailableCPUs(std::vector& physicalCPUs,
}
}
+sys::SIMDInstructionSet sys::OSUnix::getSIMDInstructionSet() const
+{
+ // https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/X86-Built-in-Functions.html
+ __builtin_cpu_init();
+
+ if (__builtin_cpu_supports("avx512f"))
+ {
+ return SIMDInstructionSet::AVX512F;
+ }
+ if (__builtin_cpu_supports("avx2"))
+ {
+ return SIMDInstructionSet::AVX2;
+ }
+ if (__builtin_cpu_supports("sse2"))
+ {
+ return SIMDInstructionSet::SSE2;
+ }
+
+ throw std::runtime_error("SSE2 support is required.");
+}
+
void sys::OSUnix::createSymlink(const std::string& origPathname,
const std::string& symlinkPathname) const
{
diff --git a/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp b/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp
index 9fe5e7f15..b8a1f39e6 100644
--- a/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp
+++ b/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp
@@ -342,6 +342,25 @@ void sys::OSWin32::getAvailableCPUs(std::vector& /*physicalCPUs*/,
Ctxt("Windows getAvailableCPUs not yet implemented."));
}
+sys::SIMDInstructionSet sys::OSWin32::getSIMDInstructionSet() const
+{
+ // https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent
+ if (IsProcessorFeaturePresent(PF_AVX512F_INSTRUCTIONS_AVAILABLE))
+ {
+ return SIMDInstructionSet::AVX512F;
+ }
+ if (IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE))
+ {
+ return SIMDInstructionSet::AVX2;
+ }
+ if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
+ {
+ return SIMDInstructionSet::SSE2;
+ }
+
+ throw std::runtime_error("SSE2 support is required.");
+}
+
void sys::OSWin32::createSymlink(const std::string& origPathname,
const std::string& symlinkPathname) const
{
diff --git a/externals/coda-oss/modules/c++/sys/unittests/test_os.cpp b/externals/coda-oss/modules/c++/sys/unittests/test_os.cpp
index af07859a3..2261acd0e 100644
--- a/externals/coda-oss/modules/c++/sys/unittests/test_os.cpp
+++ b/externals/coda-oss/modules/c++/sys/unittests/test_os.cpp
@@ -511,6 +511,17 @@ TEST_CASE(test_make_ifstream)
TEST_ASSERT_TRUE(ifs.is_open());
}
+TEST_CASE(test_SIMD_Instructions)
+{
+ const sys::OS os;
+ const auto simdInstructionSet = os.getSIMDInstructionSet();
+
+ const auto isSSE2 = simdInstructionSet == sys::SIMDInstructionSet::SSE2;
+ const auto isAVX2 = simdInstructionSet == sys::SIMDInstructionSet::AVX2;
+ const auto isAVX512F = simdInstructionSet == sys::SIMDInstructionSet::AVX512F;
+ TEST_ASSERT(isSSE2 || isAVX2 || isAVX512F);
+}
+
TEST_MAIN(
//sys::AbstractOS::setArgvPathname(argv[0]);
TEST_CHECK(testRecursiveRemove);
@@ -527,4 +538,5 @@ TEST_MAIN(
TEST_CHECK(test_sys_fopen_failure);
TEST_CHECK(test_sys_open);
TEST_CHECK(test_make_ifstream);
+ TEST_CHECK(test_SIMD_Instructions);
)
diff --git a/externals/coda-oss/modules/c++/zip/include/zip/GZipInputStream.h b/externals/coda-oss/modules/c++/zip/include/zip/GZipInputStream.h
index 783b6241f..b96f3f32a 100644
--- a/externals/coda-oss/modules/c++/zip/include/zip/GZipInputStream.h
+++ b/externals/coda-oss/modules/c++/zip/include/zip/GZipInputStream.h
@@ -20,8 +20,11 @@
*
*/
-#ifndef __ZIP_GZIP_INPUT_STREAM_H__
-#define __ZIP_GZIP_INPUT_STREAM_H__
+#pragma once
+#ifndef CODA_OSS_zip_GZipInputStream_h_INCLUDED_
+#define CODA_OSS_zip_GZipInputStream_h_INCLUDED_
+
+#include "config/Exports.h"
#include "zip/Types.h"
@@ -38,7 +41,7 @@ namespace zip
* argument is given, and in a loop. On the last run, the buffer
* size should will probably smaller than the amount requested.
*/
-class GZipInputStream: public io::InputStream
+class CODA_OSS_API GZipInputStream : public io::InputStream
{
gzFile mFile;
public:
@@ -63,5 +66,4 @@ class GZipInputStream: public io::InputStream
};
}
-#endif
-
+#endif // CODA_OSS_zip_GZipInputStream_h_INCLUDED_
diff --git a/externals/coda-oss/modules/c++/zip/include/zip/GZipOutputStream.h b/externals/coda-oss/modules/c++/zip/include/zip/GZipOutputStream.h
index 7f137d2cf..6c08d8d6e 100644
--- a/externals/coda-oss/modules/c++/zip/include/zip/GZipOutputStream.h
+++ b/externals/coda-oss/modules/c++/zip/include/zip/GZipOutputStream.h
@@ -20,8 +20,11 @@
*
*/
-#ifndef __ZIP_GZIP_OUTPUT_STREAM_H__
-#define __ZIP_GZIP_OUTPUT_STREAM_H__
+#pragma once
+#ifndef CODA_OSS_zip_GZipOutputStream_h_INCLUDED_
+#define CODA_OSS_zip_GZipOutputStream_h_INCLUDED_
+
+#include "config/Exports.h"
#include "zip/Types.h"
@@ -32,7 +35,7 @@ namespace zip
* \brief IO wrapper for zlib API
*
*/
-class GZipOutputStream: public io::OutputStream
+class CODA_OSS_API GZipOutputStream : public io::OutputStream
{
gzFile mFile;
public:
@@ -56,4 +59,4 @@ class GZipOutputStream: public io::OutputStream
};
}
-#endif
+#endif // CODA_OSS_zip_GZipOutputStream_h_INCLUDED_
\ No newline at end of file
diff --git a/externals/coda-oss/modules/c++/zip/unittests/unittest_GZip.cpp b/externals/coda-oss/modules/c++/zip/unittests/unittest_GZip.cpp
index 6439cbfd3..30a72a455 100644
--- a/externals/coda-oss/modules/c++/zip/unittests/unittest_GZip.cpp
+++ b/externals/coda-oss/modules/c++/zip/unittests/unittest_GZip.cpp
@@ -49,10 +49,14 @@ static std::string gz_to_txt(const std::filesystem::path& gz_path)
TEST_CASE(gzip)
{
- const auto inputPath = find_unittest_file("text.txt");
+ static const auto inputPath = find_unittest_file("text.txt");
+
+ const std::filesystem::path outputName_(txt_to_gz(inputPath));
+ const auto outputName = "TEST_" + outputName_.stem().string() + "_TMP" + outputName_.extension().string(); // see .gitignore
+ const auto outputDir = inputPath.parent_path();
+ const auto origOutputPath = outputDir / outputName;
+ auto outputPath = origOutputPath;
- const std::filesystem::path argv0 = sys::OS().getSpecialEnv("0");
- auto outputPath = argv0.parent_path() / txt_to_gz(inputPath);
{
io::FileInputStream input(inputPath.string());
zip::GZipOutputStream output(outputPath.string());
@@ -67,7 +71,7 @@ TEST_CASE(gzip)
TEST_ASSERT_EQ(32, buffer.size());
{
zip::GZipInputStream input(outputPath.string());
- outputPath = argv0.parent_path() / gz_to_txt(outputPath);
+ outputPath = outputDir / gz_to_txt(outputPath);
io::FileOutputStream output(outputPath.string());
while (input.streamTo(output, 8192)) ;
@@ -77,15 +81,19 @@ TEST_CASE(gzip)
const auto str = io::readFileContents(outputPath.string());
TEST_ASSERT_EQ("Hello World!", str);
}
+
+ remove(origOutputPath);
+ remove(outputPath);
}
TEST_CASE(gunzip)
{
- const auto inputPath = find_unittest_file("test.gz");
+ static const auto inputPath = find_unittest_file("test.gz");
- const std::filesystem::path argv0 = sys::OS().getSpecialEnv("0");
- const auto outputPath = argv0.parent_path() / gz_to_txt(inputPath);
-
+ const std::filesystem::path outputName_(gz_to_txt(inputPath));
+ const auto outputName = "TEST_" + outputName_.stem().string() + "_TMP" + outputName_.extension().string(); // see .gitignore
+ const auto outputPath = inputPath.parent_path() / outputName;
+
zip::GZipInputStream input(inputPath.string());
io::FileOutputStream output(outputPath.string());
while ( input.streamTo(output, 8192) );
@@ -95,6 +103,8 @@ TEST_CASE(gunzip)
const auto str = io::readFileContents(outputPath.string());
TEST_ASSERT_EQ("Hello World!", str);
+
+ remove(outputPath);
}
TEST_MAIN(
diff --git a/externals/nitro/CMakeLists.txt b/externals/nitro/CMakeLists.txt
index 62f249850..eb788b537 100644
--- a/externals/nitro/CMakeLists.txt
+++ b/externals/nitro/CMakeLists.txt
@@ -11,6 +11,7 @@ if (${CMAKE_PROJECT_NAME} STREQUAL nitro)
# we'll dial-back warnings as necessary.
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
@@ -22,7 +23,8 @@ if (${CMAKE_PROJECT_NAME} STREQUAL nitro)
if (ENABLE_ASAN)
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
- add_compile_options(-fsanitize=address)
+ add_compile_options(-fsanitize=address)
+ add_link_options(-fsanitize=address)
endif()
endif()
diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj b/externals/nitro/modules/c++/nitf-c++.vcxproj
index c4d555f22..37f4339fb 100644
--- a/externals/nitro/modules/c++/nitf-c++.vcxproj
+++ b/externals/nitro/modules/c++/nitf-c++.vcxproj
@@ -217,7 +217,7 @@
EnableAllWarnings
true
- _DEBUG;%(PreprocessorDefinitions);_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
+ _DEBUG;%(PreprocessorDefinitions)
true
$(ProjectDir)nitf\include\;$(ProjectDir)..\c\nrt\include\;$(ProjectDir)..\c\nitf\include\;$(ProjectDir)..\c\j2k\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\
Use
@@ -249,7 +249,7 @@
true
true
true
- NDEBUG;%(PreprocessorDefinitions);_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
+ NDEBUG;%(PreprocessorDefinitions)
true
$(ProjectDir)nitf\include\;$(ProjectDir)..\c\nrt\include\;$(ProjectDir)..\c\nitf\include\;$(ProjectDir)..\c\j2k\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\
Use
diff --git a/externals/nitro/modules/c++/nitf/source/UnitTests.cpp b/externals/nitro/modules/c++/nitf/source/UnitTests.cpp
index 0ad99332a..3c8f8cec7 100644
--- a/externals/nitro/modules/c++/nitf/source/UnitTests.cpp
+++ b/externals/nitro/modules/c++/nitf/source/UnitTests.cpp
@@ -53,23 +53,9 @@ static fs::path current_path()
return fs::absolute(fs::current_path());
}
-// https://stackoverflow.com/questions/13794130/visual-studio-how-to-check-used-c-platform-toolset-programmatically
static inline std::string PlatformToolset()
{
-#ifdef _WIN32
- // https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset?view=msvc-160
- // https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
- #if _MSC_VER >= 1930
- return "v143"; // Visual Studio 2022
- #elif _MSC_VER >= 1920
- return "v142"; // Visual Studio 2019
- #else
- #error "Don't know $(PlatformToolset) value.'"
- #endif
-#else
- // Linux
- return "";
-#endif
+ return os.getSpecialEnv("PlatformToolset"); // e.g., "v143" on Windows
}
// Depending on the unittest we're running, how we're running it and what platform we're on, there could
diff --git a/externals/nitro/modules/c++/nitf/unittests/test_tre_read.cpp b/externals/nitro/modules/c++/nitf/unittests/test_tre_read.cpp
index bfe69bfec..183cc048e 100644
--- a/externals/nitro/modules/c++/nitf/unittests/test_tre_read.cpp
+++ b/externals/nitro/modules/c++/nitf/unittests/test_tre_read.cpp
@@ -174,8 +174,9 @@ TEST_CASE(test_nitf_Record_unmergeTREs_hangs)
nitf_Writer* writer = nitf_Writer_construct(&error);
TEST_ASSERT_NOT_NULL(writer);
(void)nitf_Writer_prepare(writer, record, output, &error);
-
+
nitf_IOHandle_close(io);
+ nitf_Writer_destruct(&writer);
nitf_Record_destruct(&record);
nitf_Reader_destruct(&reader);
@@ -201,6 +202,10 @@ TEST_CASE(test_defaultRead_crash)
/* This parses all header data within the NITF */
(void)nitf_Reader_read(reader, io, &error);
TEST_ASSERT_TRUE(true);
+
+ nitf_IOHandle_close(io);
+ nitf_Reader_destruct(&reader);
+ TEST_ASSERT_TRUE(true);
}
@@ -281,4 +286,4 @@ TEST_CHECK(test_readRESubheader_crash); // 5
TEST_CHECK(test_nitf_Record_unmergeTREs_hangs); // 6
TEST_CHECK(test_nitf_CSEXRB_bugfix);
-)
\ No newline at end of file
+)
diff --git a/externals/nitro/modules/c/nitf-c.vcxproj b/externals/nitro/modules/c/nitf-c.vcxproj
index e8a3a1718..d8961a150 100644
--- a/externals/nitro/modules/c/nitf-c.vcxproj
+++ b/externals/nitro/modules/c/nitf-c.vcxproj
@@ -50,7 +50,7 @@
EnableAllWarnings
true
- _DEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H;_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
+ _DEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H
true
$(ProjectDir)nrt\include\;$(ProjectDir)nitf\include\;$(ProjectDir)jpeg\include\;$(ProjectDir)j2k\include\;$(ProjectDir)cgm\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;%(AdditionalIncludeDirectories)
Use
@@ -77,7 +77,7 @@
true
true
true
- NDEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H;_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
+ NDEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H
true
$(ProjectDir)nrt\include\;$(ProjectDir)nitf\include\;$(ProjectDir)jpeg\include\;$(ProjectDir)j2k\include\;$(ProjectDir)cgm\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;%(AdditionalIncludeDirectories)
Use
diff --git a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj
index bca7454ff..af32e16df 100644
--- a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj
+++ b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj
@@ -64,7 +64,7 @@
EnableAllWarnings
true
- _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH;_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
+ _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH
true
$(ProjectDir)include;$(ProjectDir)..\nrt\include;%(AdditionalIncludeDirectories)
/FS %(AdditionalOptions)
@@ -88,7 +88,7 @@
true
true
true
- NDEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH;_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
+ NDEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH
true
$(ProjectDir)include;$(ProjectDir)..\nrt\include;%(AdditionalIncludeDirectories)
/FS %(AdditionalOptions)