new gcc compile optimizations

This commit is contained in:
Eduardo Bart 2012-06-05 09:39:45 -03:00
parent e5000fa577
commit 4de9787198
2 changed files with 6 additions and 7 deletions

View File

@ -19,17 +19,15 @@ ENDIF()
# setup compiler options # setup compiler options
SET(CXX_WARNS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable") SET(CXX_WARNS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNS} -std=gnu++0x -pipe") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNS} -std=gnu++0x -pipe")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_WARNS} -pipe")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O1 -ggdb") SET(CMAKE_CXX_FLAGS_RELEASE "-Ofast -fomit-frame-pointer -mmmx -msse -msse2 -mfpmath=sse")
SET(CMAKE_CXX_FLAGS_RELEASE "-Os -ffast-math")
SET(CMAKE_C_FLAGS_RELEASE "-Os -ffast-math")
SET(CMAKE_CXX_FLAGS_RELFORPERFORMANCE "-Ofast -mmmx -msse -msse2")
SET(CMAKE_C_FLAGS_RELFORPERFORMANCE "-Ofast -mmmx -msse -msse2")
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed") SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed")
IF(CMAKE_BUILD_TYPE STREQUAL "Release")
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-O1,--sort-common,--relax,-s")
ENDIF()
MESSAGE(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) MESSAGE(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
ADD_DEFINITIONS(-D"BUILD_TYPE=\\\"${CMAKE_BUILD_TYPE}\\\"") ADD_DEFINITIONS(-D"BUILD_TYPE=\\\"${CMAKE_BUILD_TYPE}\\\"")

View File

@ -108,6 +108,7 @@ void Game::processGameStart(const LocalPlayerPtr& localPlayer, int serverBeat, b
resetGameStates(); resetGameStates();
m_localPlayer = localPlayer; m_localPlayer = localPlayer;
m_localPlayer->setName(m_characterName);
m_serverBeat = serverBeat; m_serverBeat = serverBeat;
m_canReportBugs = canReportBugs; m_canReportBugs = canReportBugs;