From fe973ba442c8b2864d2ca2d54dd9482c47555e4e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 10 Apr 2016 13:54:42 +0200 Subject: [PATCH] - tried to add precompiled headers to fastmath sources as well, but VC++ doesn't seem to want to play along. So I left this stuff in but disabled the precompilation until a solution can be found. --- src/CMakeLists.txt | 49 ++++++++++++++++++++++++++-------------------- src/g_pch2.h | 22 +++++++++++++++++++++ 2 files changed, 50 insertions(+), 21 deletions(-) create mode 100644 src/g_pch2.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bbd3a0d80..19f7c9c19 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -877,8 +877,7 @@ set( NOT_COMPILED_SOURCE_FILES asm_x86_64/tmap3.s ) -# Enable fast math for some sources -set( FASTMATH_SOURCES +set( FASTMATH_PCH_SOURCES r_swrenderer.cpp r_3dfloors.cpp r_bsp.cpp @@ -914,12 +913,35 @@ set( FASTMATH_SOURCES oplsynth/fmopl.cpp oplsynth/mlopl.cpp oplsynth/mlopl_io.cpp - oplsynth/music_opldumper_mididevice.cpp - oplsynth/music_opl_mididevice.cpp - oplsynth/opl_mus_player.cpp oplsynth/dosbox/opl.cpp oplsynth/OPL3.cpp oplsynth/nukedopl3.cpp + timidity/common.cpp + timidity/instrum.cpp + timidity/instrum_dls.cpp + timidity/instrum_font.cpp + timidity/instrum_sf2.cpp + timidity/mix.cpp + timidity/playmidi.cpp + timidity/resample.cpp + timidity/timidity.cpp + wildmidi/file_io.cpp + wildmidi/gus_pat.cpp + wildmidi/reverb.cpp + wildmidi/wm_error.cpp + r_data/colormaps.cpp + r_data/r_translate.cpp +) +# This is disabled for now because I cannot find a way to give the .pch file a different name. +# Visual C++ 2015 seems hell-bent of only allowing one .pch file with the same name as the executable. +#enable_precompiled_headers( g_pch2.h FASTMATH_PCH_SOURCES ) + +# Enable fast math for some sources +set( FASTMATH_SOURCES + ${FASTMATH_PCH_SOURCES} + oplsynth/music_opldumper_mididevice.cpp + oplsynth/music_opl_mididevice.cpp + oplsynth/opl_mus_player.cpp sound/fmodsound.cpp sound/i_music.cpp sound/i_sound.cpp @@ -944,22 +966,7 @@ set( FASTMATH_SOURCES sound/oalsound.cpp sound/sndfile_decoder.cpp sound/music_pseudo_mididevice.cpp - timidity/common.cpp - timidity/instrum.cpp - timidity/instrum_dls.cpp - timidity/instrum_font.cpp - timidity/instrum_sf2.cpp - timidity/mix.cpp - timidity/playmidi.cpp - timidity/resample.cpp - timidity/timidity.cpp - wildmidi/file_io.cpp - wildmidi/gus_pat.cpp - wildmidi/reverb.cpp wildmidi/wildmidi_lib.cpp - wildmidi/wm_error.cpp - r_data/colormaps.cpp - r_data/r_translate.cpp ) set (PCH_SOURCES @@ -1195,6 +1202,7 @@ set (PCH_SOURCES r_data/voxels.cpp r_data/renderstyle.cpp r_data/r_interpolate.cpp + sfmt/SFMT.cpp zscript/ast.cpp zscript/vmbuilder.cpp zscript/vmdisasm.cpp @@ -1235,7 +1243,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE math/tan.c math/tanh.c math/fastsin.cpp - sfmt/SFMT.cpp zzautozend.cpp ) diff --git a/src/g_pch2.h b/src/g_pch2.h new file mode 100644 index 000000000..4cd69197e --- /dev/null +++ b/src/g_pch2.h @@ -0,0 +1,22 @@ +// This is separate because the files being compiled with it use different compiler settings which may affect how the header is compiled +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include