- enabled fast math for all known non-playsim files in the CMake project.

This commit is contained in:
Christoph Oelckers 2016-02-12 12:51:09 +01:00
parent e6328c8432
commit b818624f58

View file

@ -35,6 +35,14 @@ if( CMAKE_SIZEOF_VOID_P MATCHES "8" )
set( X64 64 )
endif()
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
set ( FASTMATH "-ffast-math" )
else()
if ( MSVC )
set ( FASTMATH "/fp:fast" )
endif()
endif()
# You can either use "make install" on the FMOD distribution to put it
# in standard system locations, or you can unpack the FMOD distribution
# in the root of the zdoom tree. e.g.:
@ -101,8 +109,6 @@ if( WIN32 )
"C:/Program Files (x86)/FMOD SoundSystem/FMOD Programmers API ${WIN_TYPE}/api"
# This next one is for Randy.
"E:/Software/Dev/FMOD/${WIN_TYPE}/api"
# .. and this one for Graf Zahl
"D:/portable/FMOD SoundSystem 4.26/FMOD Programmers API WIN32/api"
)
set( FMOD_INC_PATH_SUFFIXES PATH_SUFFIXES inc )
set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib )
@ -858,6 +864,95 @@ set( NOT_COMPILED_SOURCE_FILES
asm_x86_64/tmap3.s
)
set( FASTMATH_SOURCES
nodebuild.cpp
nodebuild_classify_nosse2.cpp
nodebuild_events.cpp
nodebuild_extract.cpp
nodebuild_gl.cpp
nodebuild_utility.cpp
r_swrenderer.cpp
r_3dfloors.cpp
r_bsp.cpp
r_draw.cpp
r_drawt.cpp
r_main.cpp
r_plane.cpp
r_segs.cpp
r_sky.cpp
r_things.cpp
s_advsound.cpp
s_environment.cpp
s_playlist.cpp
s_sndseq.cpp
s_sound.cpp
GuillotineBinPack.cpp
SkylineBinPack.cpp
intermission/intermission.cpp
intermission/intermission_parse.cpp
menu/colorpickermenu.cpp
menu/joystickmenu.cpp
menu/listmenu.cpp
menu/loadsavemenu.cpp
menu/menu.cpp
menu/menudef.cpp
menu/menuinput.cpp
menu/messagebox.cpp
menu/optionmenu.cpp
menu/playerdisplay.cpp
menu/playermenu.cpp
menu/readthis.cpp
menu/videomenu.cpp
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
sound/fmodsound.cpp
sound/i_music.cpp
sound/i_sound.cpp
sound/mpg123_decoder.cpp
sound/music_cd.cpp
sound/music_dumb.cpp
sound/music_gme.cpp
sound/music_mus_midiout.cpp
sound/music_smf_midiout.cpp
sound/music_hmi_midiout.cpp
sound/music_xmi_midiout.cpp
sound/music_midistream.cpp
sound/music_midi_base.cpp
sound/music_midi_timidity.cpp
sound/music_mus_opl.cpp
sound/music_stream.cpp
sound/music_fluidsynth_mididevice.cpp
sound/music_softsynth_mididevice.cpp
sound/music_timidity_mididevice.cpp
sound/music_wildmidi_mididevice.cpp
sound/music_win_mididevice.cpp
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
)
add_executable( zdoom WIN32 MACOSX_BUNDLE
${HEADER_FILES}
${NOT_COMPILED_SOURCE_FILES}
@ -865,6 +960,7 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
${ASM_SOURCES}
${SYSTEM_SOURCES}
${X86_SOURCES}
${FASTMATH_SOURCES}
x86.cpp
actorptrselect.cpp
am_map.cpp
@ -930,12 +1026,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
memarena.cpp
md5.cpp
name.cpp
nodebuild.cpp
nodebuild_classify_nosse2.cpp
nodebuild_events.cpp
nodebuild_extract.cpp
nodebuild_gl.cpp
nodebuild_utility.cpp
pathexpander.cpp
p_3dfloors.cpp
p_3dmidtex.cpp
@ -979,23 +1069,8 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
p_xlat.cpp
parsecontext.cpp
po_man.cpp
portal.cpp
r_swrenderer.cpp
portal.cpp
r_utility.cpp
r_3dfloors.cpp
r_bsp.cpp
r_draw.cpp
r_drawt.cpp
r_main.cpp
r_plane.cpp
r_segs.cpp
r_sky.cpp
r_things.cpp
s_advsound.cpp
s_environment.cpp
s_playlist.cpp
s_sndseq.cpp
s_sound.cpp
sc_man.cpp
st_stuff.cpp
statistics.cpp
@ -1017,8 +1092,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
wi_stuff.cpp
zstrformat.cpp
zstring.cpp
GuillotineBinPack.cpp
SkylineBinPack.cpp
g_doom/a_doommisc.cpp
g_heretic/a_hereticmisc.cpp
g_hexen/a_hexenmisc.cpp
@ -1062,30 +1135,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
g_shared/sbar_mugshot.cpp
g_shared/shared_hud.cpp
g_shared/shared_sbar.cpp
intermission/intermission.cpp
intermission/intermission_parse.cpp
menu/colorpickermenu.cpp
menu/joystickmenu.cpp
menu/listmenu.cpp
menu/loadsavemenu.cpp
menu/menu.cpp
menu/menudef.cpp
menu/menuinput.cpp
menu/messagebox.cpp
menu/optionmenu.cpp
menu/playerdisplay.cpp
menu/playermenu.cpp
menu/readthis.cpp
menu/videomenu.cpp
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
resourcefiles/ancientzip.cpp
resourcefiles/file_7z.cpp
resourcefiles/file_grp.cpp
@ -1097,30 +1146,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
resourcefiles/file_directory.cpp
resourcefiles/resourcefile.cpp
sfmt/SFMT.cpp
sound/fmodsound.cpp
sound/i_music.cpp
sound/i_sound.cpp
sound/mpg123_decoder.cpp
sound/music_cd.cpp
sound/music_dumb.cpp
sound/music_gme.cpp
sound/music_mus_midiout.cpp
sound/music_smf_midiout.cpp
sound/music_hmi_midiout.cpp
sound/music_xmi_midiout.cpp
sound/music_midistream.cpp
sound/music_midi_base.cpp
sound/music_midi_timidity.cpp
sound/music_mus_opl.cpp
sound/music_stream.cpp
sound/music_fluidsynth_mididevice.cpp
sound/music_softsynth_mididevice.cpp
sound/music_timidity_mididevice.cpp
sound/music_wildmidi_mididevice.cpp
sound/music_win_mididevice.cpp
sound/oalsound.cpp
sound/sndfile_decoder.cpp
sound/music_pseudo_mididevice.cpp
textures/animations.cpp
textures/anim_switches.cpp
textures/automaptexture.cpp
@ -1150,20 +1175,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
thingdef/thingdef_parse.cpp
thingdef/thingdef_properties.cpp
thingdef/thingdef_states.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
xlat/parse_xlat.cpp
fragglescript/t_fspic.cpp
fragglescript/t_func.cpp
@ -1175,12 +1186,10 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
fragglescript/t_spec.cpp
fragglescript/t_variable.cpp
fragglescript/t_cmd.cpp
r_data/colormaps.cpp
r_data/sprites.cpp
r_data/voxels.cpp
r_data/renderstyle.cpp
r_data/r_interpolate.cpp
r_data/r_translate.cpp
zscript/ast.cpp
zscript/vmbuilder.cpp
zscript/vmdisasm.cpp
@ -1192,9 +1201,14 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
zzautozend.cpp
)
set_source_files_properties( ${FASTMATH_SOURCES} PROPERTIES COMPILE_FLAGS ${FASTMATH} )
set_source_files_properties( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" )
set_source_files_properties( sc_man.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h" )
set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE )
if ( WIN32 )
set_source_files_properties( win32/fb_d3d9.cpp win32/fb_d3d9_wipe.cpp PROPERTIES COMPILE_FLAGS ${FASTMATH} )
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
# [BL] Solaris requires these to be explicitly linked.
@ -1214,6 +1228,7 @@ include_directories( .
textures
thingdef
timidity
wildmidi
xlat
zscript
../gdtoa