diff --git a/UnitTest/UnitTest.vcxproj b/UnitTest/UnitTest.vcxproj index 82c3d478b..bae72b864 100644 --- a/UnitTest/UnitTest.vcxproj +++ b/UnitTest/UnitTest.vcxproj @@ -55,7 +55,7 @@ Use - Level3 + Level4 true $(ProjectDir);$(SolutionDir)modules\c\nrt\include;$(SolutionDir)modules\c\nitf\include;$(SolutionDir)modules\c++\nitf\include;$(SolutionDir)modules\c\j2k\include;$(SolutionDir)modules\c;$(SolutionDir)modules\c++;$(SolutionDir)externals\coda-oss\modules\c++;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) _DEBUG;%(PreprocessorDefinitions) diff --git a/modules/c++/CMakeLists.txt b/modules/c++/CMakeLists.txt index 6b60cd28f..320ab2705 100644 --- a/modules/c++/CMakeLists.txt +++ b/modules/c++/CMakeLists.txt @@ -3,9 +3,12 @@ set(TARGET_LANGUAGE c++) # turn on warnings as errors if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding - # /W4 results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # /Wall + # /Wn results in a compiler warning. + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) elseif (UNIX) #add_compile_options(-Wall -pedantic -Wextra) diff --git a/modules/c++/nitf-c++.vcxproj b/modules/c++/nitf-c++.vcxproj index f49244c4c..6d12f0550 100644 --- a/modules/c++/nitf-c++.vcxproj +++ b/modules/c++/nitf-c++.vcxproj @@ -214,7 +214,7 @@ - EnableAllWarnings + Level4 true _DEBUG;%(PreprocessorDefinitions) true @@ -233,6 +233,7 @@ AdvancedVectorExtensions2 MultiThreadedDebugDLL true + true diff --git a/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj b/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj index 66dcf81ba..944eafbc5 100644 --- a/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj +++ b/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj @@ -47,7 +47,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true @@ -65,6 +65,7 @@ true AdvancedVectorExtensions2 true + true Console diff --git a/modules/c++/nitf/source/UnitTests.cpp b/modules/c++/nitf/source/UnitTests.cpp index b735cd100..31c651133 100644 --- a/modules/c++/nitf/source/UnitTests.cpp +++ b/modules/c++/nitf/source/UnitTests.cpp @@ -271,7 +271,7 @@ static std::string buildPluginName(const std::string& base) void nitf::Test::setNitfPluginPath() { // The name of the plugin we know exists and will always be built, see test_load_plugins - static const auto p = getNitfPluginPath(buildPluginName("XML_DATA_CONTENT")); + static const auto p = getNitfPluginPath(buildPluginName("TEST_DES")); sys::OS().setEnv("NITF_PLUGIN_PATH", p.string(), true /*overwrite*/); } diff --git a/modules/c++/nitf/unittests/test_load_plugins.cpp b/modules/c++/nitf/unittests/test_load_plugins.cpp index 4f84931dc..7faca56d2 100644 --- a/modules/c++/nitf/unittests/test_load_plugins.cpp +++ b/modules/c++/nitf/unittests/test_load_plugins.cpp @@ -87,7 +87,7 @@ TEST_CASE(test_load_ENGRDA) TEST_CASE(test_load_all_TREs) { - const nitf::TRE tre("ACCPOB"); + const nitf::TRE ACCPOB("ACCPOB"); for (const auto& tre : all_TREs()) { diff --git a/modules/c/CMakeLists.txt b/modules/c/CMakeLists.txt index 6e6b185dc..3d2a21634 100644 --- a/modules/c/CMakeLists.txt +++ b/modules/c/CMakeLists.txt @@ -4,9 +4,12 @@ set(TARGET_LANGUAGE c) # turn on warnings as errors if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding - # /W4 results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") # /Wall + # /Wn results in a compiler warning. + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) add_compile_options(/wd4996) # '...': This function or variable may be unsafe. elseif (UNIX) diff --git a/modules/c/j2k/J2KCompress.vcxproj b/modules/c/j2k/J2KCompress.vcxproj index 60e9ab7d1..021fcb706 100644 --- a/modules/c/j2k/J2KCompress.vcxproj +++ b/modules/c/j2k/J2KCompress.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH;HAVE_J2K_H true diff --git a/modules/c/j2k/J2KDecompress.vcxproj b/modules/c/j2k/J2KDecompress.vcxproj index 6c31591a4..366e0b421 100644 --- a/modules/c/j2k/J2KDecompress.vcxproj +++ b/modules/c/j2k/J2KDecompress.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH;HAVE_J2K_H true diff --git a/modules/c/nitf-c.vcxproj b/modules/c/nitf-c.vcxproj index 370fb800b..be058c828 100644 --- a/modules/c/nitf-c.vcxproj +++ b/modules/c/nitf-c.vcxproj @@ -48,7 +48,7 @@ - EnableAllWarnings + Level4 true _DEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H true @@ -68,6 +68,7 @@ false MultiThreadedDebugDLL true + true diff --git a/modules/c/nitf/TEST_DES.vcxproj b/modules/c/nitf/TEST_DES.vcxproj index aa27cf8dd..58478f202 100644 --- a/modules/c/nitf/TEST_DES.vcxproj +++ b/modules/c/nitf/TEST_DES.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH true diff --git a/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/modules/c/nitf/XML_DATA_CONTENT.vcxproj index 09c43df9f..2760bc1aa 100644 --- a/modules/c/nitf/XML_DATA_CONTENT.vcxproj +++ b/modules/c/nitf/XML_DATA_CONTENT.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH true