Skip to content

Commit

Permalink
Include Common/Platform.hpp in to the every precompiled header
Browse files Browse the repository at this point in the history
Create precompiled header for xrMisc and xrMiscMath
  • Loading branch information
Xottab-DUTY committed Nov 10, 2017
1 parent a07ace1 commit 0abb9ac
Show file tree
Hide file tree
Showing 49 changed files with 106 additions and 167 deletions.
1 change: 1 addition & 0 deletions Externals/cximage/ximacfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern "C" void* cxrealloc(void* ptr, size_t size);

#ifdef CXIMAGE_AS_SHARED_LIBRARY //must be defined in Release_Shared configuration

#include "Common/Platform.hpp"
// XXX: dirty hack.
#undef max
#undef min
Expand Down
29 changes: 1 addition & 28 deletions src/Layers/xrAPI/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#endif

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>

// TODO: reference additional headers your program requires here
#include "Common/Platform.hpp"
2 changes: 2 additions & 0 deletions src/Layers/xrRenderPC_R1/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "Common/Platform.hpp"

#ifdef _DEBUG
#define D3D_DEBUG_INFO
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/Layers/xrRenderPC_R2/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include "Common/Platform.hpp"

#ifdef _DEBUG
#define D3D_DEBUG_INFO
#endif
Expand Down
6 changes: 2 additions & 4 deletions src/Layers/xrRenderPC_R3/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#pragma once

#include "Common/Platform.hpp"

#ifdef _DEBUG
#define D3D_DEBUG_INFO
#endif
Expand Down
6 changes: 2 additions & 4 deletions src/Layers/xrRenderPC_R4/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#pragma once

#include "Common/Platform.hpp"

#ifdef _DEBUG
#define D3D_DEBUG_INFO
#endif
Expand Down
1 change: 1 addition & 0 deletions src/editors/xrManagedApi/Pch.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
#include "Common/Platform.hpp"
// XXX nitrocaster: move to src/Common.hpp (common engine header)
#define DLL_API __declspec(dllimport)
6 changes: 2 additions & 4 deletions src/editors/xrWeatherEditor/pch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// Description : precompiled header for editor library
////////////////////////////////////////////////////////////////////////////

#ifndef PCH_HPP_INCLUDED
#define PCH_HPP_INCLUDED
#pragma once

#include "Common/Platform.hpp"
#include "xrCommon/inlining_macros.h"

#ifdef DEBUG
Expand Down Expand Up @@ -67,5 +67,3 @@ inline LPSTR to_string(System::String ^ string)
}

inline System::String ^ to_string(LPCSTR string) { return (gcnew System::String(string)); }

#endif // #ifndef PCH_HPP_INCLUDED
12 changes: 1 addition & 11 deletions src/utils/ETools/StdAfx.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
// Third generation by Oles.

#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_

#pragma once
#define ENGINE_API
#define NO_XRC_STATS

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"

#pragma warning(push)
Expand All @@ -30,5 +22,3 @@
#pragma comment(lib, "xrCDB.lib")
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
6 changes: 2 additions & 4 deletions src/utils/mp_configs_verifyer/pch.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef PCH_H_INCLUDED
#define PCH_H_INCLUDED
#pragma once

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"
#include "xrCore/LocatorAPI.h"
#include "xrCore/ppmd_compressor.h"
Expand All @@ -9,5 +9,3 @@
#include <conio.h>
#include "Common/object_broker.h"
#include "xrCore/Containers/AssociativeVector.hpp"

#endif // #define PCH_H_INCLUDED
6 changes: 2 additions & 4 deletions src/utils/mp_screenshots_info/pch.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#ifndef PCH_H_INCLUDED
#define PCH_H_INCLUDED
#pragma once

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"
#include "xrCore/LocatorAPI.h"

#include <stdio.h>

#endif // #define PCH_H_INCLUDED
12 changes: 1 addition & 11 deletions src/utils/xrAI/StdAfx.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_)
#define AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7

#pragma once

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"

#pragma warning(push)
Expand Down Expand Up @@ -39,7 +32,6 @@ extern CThreadManager::ReportProgressFunc ProxyProgress;
#ifdef AI_COMPILER
#include "xrServerEntities/smart_cast.h"
#endif
// TODO: reference additional headers your program requires here

#define READ_IF_EXISTS(ltx, method, section, name, default_value)\
(ltx->line_exist(section, name)) ? ltx->method(section, name) : default_value
Expand Down Expand Up @@ -78,5 +70,3 @@ IC xr_string string2xr_string(LPCSTR s) { return s ? s : ""; }

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7)
5 changes: 3 additions & 2 deletions src/utils/xrCompress/StdAfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

//. #define MOD_COMPRESS

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"

#include "lzo\lzo1x.h"
#include "lzo/lzo1x.h"
#include <mmsystem.h>

#pragma warning(push)
#pragma warning(disable : 4995)
#include <io.h>
#include <direct.h>
#include <fcntl.h>
#include <sys\stat.h>
#include <sys/stat.h>
#include <malloc.h>
#pragma warning(pop)

Expand Down
12 changes: 1 addition & 11 deletions src/utils/xrDO_Light/StdAfx.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_)
#define AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7

#pragma once

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"

#pragma warning(push)
Expand All @@ -32,7 +25,6 @@
#ifdef AI_COMPILER
#include "smart_cast.h"
#endif
// TODO: reference additional headers your program requires here

#include "utils/xrLCUtil/ILevelCompilerLogger.hpp"
#include "utils/xrLCUtil/xrThread.hpp"
Expand Down Expand Up @@ -78,5 +70,3 @@ IC xr_string string2xr_string(LPCSTR s) { return s ? s : ""; }

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7)
12 changes: 1 addition & 11 deletions src/utils/xrDXT/StdAfx.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
// Third generation by Oles.

#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_

#pragma once

#include "Common/Platform.hpp"
#include "xrCore/xrCore.h"
#include <io.h>
#include <fcntl.h>
Expand All @@ -27,5 +19,3 @@

#pragma comment(lib, "xrCore.lib")
#pragma warning(disable : 4995)

#endif
1 change: 1 addition & 0 deletions src/utils/xrLC/StdAfx.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include "Common/Platform.hpp"
#include "utils/xrLC_Light/xrLC_Light.h"

#define ENGINE_API // fake, to enable sharing with engine
Expand Down
1 change: 1 addition & 0 deletions src/utils/xrLCUtil/pch.hpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#pragma once
#include "Common/Platform.hpp"
#include "xrLCUtil.hpp"
31 changes: 1 addition & 30 deletions src/utils/xrLC_Light/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifndef XR_LC_LIGHT_STD_AFIX_H_
#define XR_LC_LIGHT_STD_AFIX_H_
#pragma once
/*
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
*/
#include "Common/Platform.hpp"

//#define COLLECT_EXECUTION_STATS

Expand All @@ -45,5 +18,3 @@ extern CThreadManager::ReportProgressFunc ProxyProgress;
#ifdef DEBUG
#define CL_NET_LOG
#endif

#endif
1 change: 1 addition & 0 deletions src/utils/xrMiscMath/matrix.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "pch.hpp"
#include "xrCore/_matrix.h"
#include "xrCore/_quaternion.h"
#include "xrCore/xrDebug_macros.h"
Expand Down
1 change: 1 addition & 0 deletions src/utils/xrMiscMath/pch.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "pch.hpp"
3 changes: 3 additions & 0 deletions src/utils/xrMiscMath/pch.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

#include "Common/Platform.hpp"
1 change: 1 addition & 0 deletions src/utils/xrMiscMath/quaternion.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "pch.hpp"
#include "xrCore/_quaternion.h"
#include "xrCore/_matrix.h"

Expand Down
1 change: 1 addition & 0 deletions src/utils/xrMiscMath/vector.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "pch.hpp"
#include <limits>
#include "xrCore/vector.h"
#include "xrCore/_vector3d.h"
Expand Down
1 change: 1 addition & 0 deletions src/utils/xrMiscMath/vector3d_ext.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "pch.hpp"
#include "xrCore/_vector3d_ext.h"

float dotproduct(const Fvector& v1, const Fvector& v2)
Expand Down
1 change: 1 addition & 0 deletions src/utils/xrMiscMath/xrMiscMath.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "pch.hpp"
#include "xrCore/_vector3d.h"
//#include "xrCore/math_constants.h"
#include "xrCore/vector.h"
Expand Down
14 changes: 14 additions & 0 deletions src/utils/xrMiscMath/xrMiscMath.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<DisableSpecificWarnings>4251;4275;4458;4244</DisableSpecificWarnings>
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.hpp</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand All @@ -94,6 +96,8 @@
<DisableSpecificWarnings>4251;4275;4458;4244</DisableSpecificWarnings>
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.hpp</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -108,6 +112,8 @@
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.hpp</PrecompiledHeaderFile>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand All @@ -126,6 +132,8 @@
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.hpp</PrecompiledHeaderFile>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand All @@ -134,11 +142,17 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="matrix.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="quaternion.cpp" />
<ClCompile Include="vector.cpp" />
<ClCompile Include="vector3d_ext.cpp" />
<ClCompile Include="xrMiscMath.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
Loading

0 comments on commit 0abb9ac

Please sign in to comment.