Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ target_link_libraries(corei_always INTERFACE
corei_libraries_include
resources
)
target_precompile_headers(corei_always INTERFACE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
)

# Set where the build results will end up
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
2 changes: 0 additions & 2 deletions Core/GameEngine/Include/Common/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@

#pragma once

#include <Utility/CppMacros.h>

class AsciiString;

#define NO_RELEASE_DEBUG_LOGGING
Expand Down
1 change: 0 additions & 1 deletion Core/Libraries/Include/Lib/BaseTypeCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <string.h>
// TheSuperHackers @build feliwir 07/04/2025 Adds utility macros for cross-platform compatibility
#include <Utility/compat.h>
#include <Utility/CppMacros.h>
#include <Utility/stdint_adapter.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ target_compile_definitions(core_wwcommon INTERFACE

target_link_libraries(core_wwcommon INTERFACE
core_config
core_utility
corei_always
d3d8lib
milesstub
stlport
Expand Down
1 change: 0 additions & 1 deletion Core/Libraries/Source/WWVegas/WWDebug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ target_sources(core_wwdebug PRIVATE ${WWDEBUG_SRC})

target_link_libraries(core_wwdebug PRIVATE
core_wwcommon
corei_always
)
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ target_include_directories(core_wwlib PUBLIC
)

target_precompile_headers(core_wwlib PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
always.h
STLUtils.h
win.h
Expand All @@ -186,5 +187,4 @@ target_precompile_headers(core_wwlib PRIVATE

target_link_libraries(core_wwlib PRIVATE
core_wwcommon
corei_always
)
1 change: 0 additions & 1 deletion Core/Libraries/Source/WWVegas/WWLib/STLUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <cstddef>
#include <map>
#include <utility>
#include <Utility/CppMacros.h>

namespace stl
{
Expand Down
1 change: 0 additions & 1 deletion Core/Libraries/Source/WWVegas/WWStub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ target_sources(core_wwstub PRIVATE ${WWSTUB_SRC})

target_link_libraries(core_wwstub PRIVATE
core_wwcommon
corei_always
)
1 change: 1 addition & 0 deletions Core/Libraries/Source/debug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_include_directories(core_debug INTERFACE
)

target_precompile_headers(core_debug PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
"debug.h"
"internal.h"
"internal_except.h"
Expand Down
1 change: 1 addition & 0 deletions Core/Libraries/Source/profile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ target_include_directories(core_profile INTERFACE
)

target_precompile_headers(core_profile PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
"profile.h"
"internal.h"
<windows.h>
Expand Down
1 change: 0 additions & 1 deletion Core/Libraries/Source/profile/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "internal_highlevel.h"
#include "internal_cmd.h"
#include "internal_result.h"
#include "Utility/CppMacros.h"
#include <windows.h>

#if !(defined(_MSC_VER) && _MSC_VER < 1300)
Expand Down
1 change: 1 addition & 0 deletions Core/Tools/W3DView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ add_library(corei_w3dview INTERFACE)
target_sources(corei_w3dview INTERFACE ${W3DVIEW_SRC})

target_precompile_headers(corei_w3dview INTERFACE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
"StdAfx.h"
[["always.h"]]
[["STLUtils.h"]]
Expand Down
22 changes: 11 additions & 11 deletions Core/Tools/WW3D/max2w3d/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ INode *Find_Named_Node (char *nodename, INode *root);
/*
** Macros
*/
#define SAFE_DELETE(pobject) \
if (pobject) { \
delete pobject; \
pobject = NULL; \
} \

#define SAFE_DELETE_ARRAY(pobject) \
if (pobject) { \
delete [] pobject; \
pobject = NULL; \
} \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This magically failed to compile for no reason so I touched this and then it was fine.

D:\Projects\TheSuperHackers\GeneralsGameCode\Core\Tools\WW3D\max2w3d\util.h(113) : fatal error C1004: unexpected end of file found

Code is very strong here...

#define SAFE_DELETE(pobject) \
if (pobject) { \
delete pobject; \
pobject = NULL; \
}

#define SAFE_DELETE_ARRAY(pobject) \
if (pobject) { \
delete [] pobject; \
pobject = NULL; \
}
1 change: 0 additions & 1 deletion Dependencies/Utility/Utility/endian_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#ifndef ENDIAN_COMPAT_H
#define ENDIAN_COMPAT_H

#include <Utility/CppMacros.h>
#include <Utility/stdint_adapter.h>


Expand Down
3 changes: 1 addition & 2 deletions Generals/Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ target_compile_definitions(gi_always INTERFACE
RTS_GENERALS=1
)
target_link_libraries(gi_always INTERFACE
core_utility
gi_libraries_include
# Must stay below so headers from game are included first
corei_libraries_include
corei_always
)

# Contains internal libraries
Expand Down
5 changes: 4 additions & 1 deletion Generals/Code/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1096,4 +1096,7 @@ target_link_libraries(g_gameengine PUBLIC
g_wwvegas
)

target_precompile_headers(g_gameengine PRIVATE Include/Precompiled/PreRTS.h)
target_precompile_headers(g_gameengine PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
Include/Precompiled/PreRTS.h
)
5 changes: 3 additions & 2 deletions Generals/Code/GameEngineDevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ target_include_directories(g_gameenginedevice PUBLIC
)

target_precompile_headers(g_gameenginedevice PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
[["Common/STLTypedefs.h"]]
[["Common/SubsystemInterface.h"]]
[["INI.h"]]
Expand All @@ -199,8 +200,8 @@ target_precompile_headers(g_gameenginedevice PRIVATE

target_link_libraries(g_gameenginedevice PRIVATE
corei_gameenginedevice_private
gi_always
gi_main
gi_always
gi_main
)

target_link_libraries(g_gameenginedevice PUBLIC
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/Libraries/Source/WWVegas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ add_library(g_wwcommon INTERFACE)

target_link_libraries(g_wwcommon INTERFACE
core_config
core_utility
core_wwcommon
d3d8lib
gi_always
milesstub
stlport
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ target_compile_definitions(g_ww3d2 PRIVATE
)

target_precompile_headers(g_ww3d2 PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
dx8wrapper.h
[["always.h"]]
[["STLUtils.h"]]
Expand Down
8 changes: 3 additions & 5 deletions Generals/Code/Tools/ParticleEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ target_include_directories(g_particleeditor PRIVATE
res
)

target_compile_definitions(g_particleeditor PRIVATE _AFXDLL)

target_link_libraries(g_particleeditor PRIVATE
core_config
corei_libraries_source_wwvegas
corei_libraries_source_wwvegas_wwlib
d3d8lib
gi_gameengine_include
gi_always
gi_gameengine_include
gi_libraries_source_wwvegas
core_config
imm32
stlport
vfw32
Expand All @@ -54,7 +52,7 @@ target_link_libraries(g_particleeditor PRIVATE

if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
target_link_options(g_particleeditor PRIVATE /NODEFAULTLIB:libci.lib /NODEFAULTLIB:libc.lib)

target_compile_definitions(g_particleeditor PRIVATE _AFXDLL)
target_sources(g_particleeditor PRIVATE ParticleEditor.rc)
set_target_properties(g_particleeditor PROPERTIES OUTPUT_NAME ParticleEditor)
else()
Expand Down
1 change: 1 addition & 0 deletions Generals/Code/Tools/WorldBuilder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ target_include_directories(g_worldbuilder PRIVATE
target_compile_definitions(g_worldbuilder PRIVATE _AFXDLL)

target_precompile_headers(g_worldbuilder PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
[["always.h"]]
[["Common/STLTypedefs.h"]]
[["StdAfx.h"]]
Expand Down
3 changes: 1 addition & 2 deletions GeneralsMD/Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ target_compile_definitions(zi_always INTERFACE
RTS_ZEROHOUR=1
)
target_link_libraries(zi_always INTERFACE
core_utility
zi_libraries_include
# Must stay below so headers from game are included first
corei_libraries_include
corei_always
)

# Contains internal libraries
Expand Down
5 changes: 4 additions & 1 deletion GeneralsMD/Code/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1174,4 +1174,7 @@ target_link_libraries(z_gameengine PUBLIC
z_wwvegas
)

target_precompile_headers(z_gameengine PRIVATE Include/Precompiled/PreRTS.h)
target_precompile_headers(z_gameengine PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
Include/Precompiled/PreRTS.h
)
1 change: 1 addition & 0 deletions GeneralsMD/Code/GameEngineDevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ target_include_directories(z_gameenginedevice PUBLIC
)

target_precompile_headers(z_gameenginedevice PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
[["Common/STLTypedefs.h"]]
[["Common/SubsystemInterface.h"]]
[["INI.h"]]
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Libraries/Source/WWVegas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ add_library(z_wwcommon INTERFACE)

target_link_libraries(z_wwcommon INTERFACE
core_config
core_utility
core_wwcommon
d3d8lib
milesstub
stlport
zi_always
)

target_include_directories(z_wwcommon INTERFACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ target_compile_definitions(z_ww3d2 PRIVATE
)

target_precompile_headers(z_ww3d2 PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
dx8wrapper.h
[["always.h"]]
[["STLUtils.h"]]
Expand Down
4 changes: 2 additions & 2 deletions GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ target_include_directories(z_particleeditor PRIVATE
)

target_link_libraries(z_particleeditor PRIVATE
core_config
core_debug
core_profile
corei_libraries_source_wwvegas
corei_libraries_source_wwvegas_wwlib
d3d8lib
imm32
core_config
stlport
vfw32
winmm
zi_gameengine_include
zi_always
zi_gameengine_include
zi_libraries_source_wwvegas
)

Expand Down
1 change: 1 addition & 0 deletions GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ target_include_directories(z_worldbuilder PRIVATE
)

target_precompile_headers(z_worldbuilder PRIVATE
[["Utility/CppMacros.h"]] # Must be first, to be removed when abandoning VC6
[["always.h"]]
[["Common/STLTypedefs.h"]]
[["StdAfx.h"]]
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Tools/wdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ target_sources(z_wdump PRIVATE ${WDUMP_SRC})

target_link_libraries(z_wdump PRIVATE
core_config
core_utility
core_wwstub # avoid linking GameEngine
imm32
vfw32
winmm
z_wwvegas
zi_always
)

if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
Expand Down
Loading