Compilation changes

Few compile time attempts to speed things up

Swap include guards for pramga once
Change compile options in the cmakeLists for source
generate a pch

small tweaks
This commit is contained in:
marauder2k7 2026-05-21 23:55:35 +01:00
parent 0df3bea9ca
commit 68e762130d
1016 changed files with 2848 additions and 5532 deletions

View file

@ -92,9 +92,9 @@ endif()
set(TORQUE_ADDITIONAL_LIBRARY_BINARIES "")
# All compile definitions. Modules should append to this if there is any special defines needed.
set(TORQUE_COMPILE_DEFINITIONS ICE_NO_DLL PCRE_STATIC TORQUE_ADVANCED_LIGHTING TORQUE_SHADERGEN
TORQUE_OPCODE TORQUE_ASSIMP TORQUE_SDL TORQUE_COLLADA
TORQUE_UNICODE UNICODE _UNICODE)
set(TORQUE_COMPILE_DEFINITIONS ICE_NO_DLL PCRE_STATIC TORQUE_ADVANCED_LIGHTING TORQUE_SHADERGEN BAN_OPCODE_AUTOLINK _CRT_SECURE_NO_DEPRECATE
TORQUE_OPCODE TORQUE_ASSIMP TORQUE_SDL TORQUE_COLLADA LTC_NO_PROTOTYPES INITGUID NOWINBASEINTERLOCK
TORQUE_UNICODE UNICODE _UNICODE NOMINMAX WIN32_LEAN_AND_MEAN)
# All link libraries. Modules should append to this the path to specify additional link libraries (.a, .lib, .dylib, .so)
set(TORQUE_LINK_LIBRARIES png_static tinyxml2 collada squish opcode assimp SDL2 glad pcre convexMath zlib)

View file

@ -54,11 +54,11 @@ ENDMACRO()
# specified directory then adds them to the TORQUE_SOURCE_FILES variable.
macro (torqueAddSourceDirectories)
foreach(ARGUMENT ${ARGV})
file(GLOB SCANNED_SOURCE_FILES "${ARGUMENT}/*.cpp")
file(GLOB SCANNED_INCLUDE_FILES "${ARGUMENT}/*.h")
file(GLOB SCANNED_SOURCE_FILES CONFIGURE_DEPENDS "${ARGUMENT}/*.cpp")
file(GLOB SCANNED_INCLUDE_FILES CONFIGURE_DEPENDS "${ARGUMENT}/*.h")
if (APPLE)
file(GLOB SCANNED_MAC_FILES "${ARGUMENT}/*.mm")
file(GLOB SCANNED_MAC_FILES CONFIGURE_DEPENDS "${ARGUMENT}/*.mm")
endif (APPLE)
# Set in both current and parent scope so this macro can be used from loaded modules