Skip to content

Commit

Permalink
latest from CODA-OSS and NITRO
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith authored and Dan Smith committed Jul 18, 2023
1 parent 95cd925 commit 31baed9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 53 deletions.
1 change: 0 additions & 1 deletion externals/coda-oss/modules/c++/coda-oss.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
Expand Down
98 changes: 46 additions & 52 deletions externals/nitro/UnitTest/pch.h
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
// pch.h: This is a precompiled header file.
// Files listed below are compiled only once, improving build performance for future builds.
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
// Do not add files here that you will be updating frequently as this negates the performance advantage.

#ifndef PCH_H
#define PCH_H
#pragma once

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#pragma warning(push)
#pragma warning(disable: 5039) // '...': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
#include <windows.h>
#pragma warning(pop)
#pragma comment(lib, "ws2_32")

#pragma warning(disable: 4820) // '...': '...' bytes padding added after data member '...'
#pragma warning(disable: 4710) // '...': function not inlined
#pragma warning(disable: 5045) // Compiler will insert Spectre mitigation for memory load if / Qspectre switch specified
#pragma warning(disable: 4668) // '...' is not defined as a preprocessor macro, replacing with '...' for '...'
// TODO: get rid of these someday?
#pragma warning(disable: 5039) // '...': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
#pragma warning(disable: 4514) // '...': unreferenced inline function has been removed

// We're building in Visual Studio ... used to control where we get a little bit of config info
#define NITRO_PCH 1

#pragma warning(disable: 5032) // detected #pragma warning(push) with no corresponding #pragma warning(pop)
#pragma warning(push)
#pragma warning(disable: 4464) // relative include path contains '..'
#include <nitf/coda-oss.hpp>
#pragma warning(disable: 5031) // #pragma warning(pop): likely mismatch, popping warning state pushed in different file
#pragma comment(lib, "io-c++")
#pragma comment(lib, "except-c++")
#pragma comment(lib, "sys-c++")
#pragma comment(lib, "str-c++")
#pragma warning(pop)

#pragma warning(push)
#include "CppUnitTest.h"
#pragma warning(pop)

#include <import/nrt.h>
#include <import/nitf.h>
#include <nitf/System.hpp>

#include "nitf_Test.h"
#include "Test.h"

#endif //PCH_H
// pch.h: This is a precompiled header file.
// Files listed below are compiled only once, improving build performance for future builds.
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
// Do not add files here that you will be updating frequently as this negates the performance advantage.

#ifndef PCH_H
#define PCH_H

// add headers that you want to pre-compile here

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#pragma warning(push)
#pragma warning(disable: 5039) // '...': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior
#include <windows.h>
#pragma warning(pop)
#pragma comment(lib, "ws2_32")

// We're building in Visual Studio ... used to control where we get a little bit of config info
#define NITRO_PCH 1

#include <import/nrt.h>
#include <import/nitf.h>
#include <nitf/TestingTest.h>

#include <nitf/coda-oss.hpp>
#pragma comment(lib, "io-c++")
#pragma comment(lib, "io-c++")
#pragma comment(lib, "except-c++")
#pragma comment(lib, "sys-c++")
#pragma comment(lib, "str-c++")
#pragma comment(lib, "sio.lite-c++.lib")
#pragma comment(lib, "math-c++")
#pragma comment(lib, "mt-c++")

#include <import/nitf.hpp>
#include <nitf/UnitTests.hpp>
#include <nitf/TREField.hpp>
#include <nitf/TestingTest.hpp>
#include <nitf/UnitTests.hpp>

#include "Test.h"

#endif //PCH_H

0 comments on commit 31baed9

Please sign in to comment.