new gcc compile optimizations
This commit is contained in:
parent
e5000fa577
commit
4de9787198
|
@ -19,17 +19,15 @@ ENDIF()
|
|||
# setup compiler options
|
||||
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_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_WARNS} -pipe")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
||||
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_FLAGS_RELEASE "-Ofast -fomit-frame-pointer -mmmx -msse -msse2 -mfpmath=sse")
|
||||
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})
|
||||
ADD_DEFINITIONS(-D"BUILD_TYPE=\\\"${CMAKE_BUILD_TYPE}\\\"")
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ void Game::processGameStart(const LocalPlayerPtr& localPlayer, int serverBeat, b
|
|||
resetGameStates();
|
||||
|
||||
m_localPlayer = localPlayer;
|
||||
m_localPlayer->setName(m_characterName);
|
||||
m_serverBeat = serverBeat;
|
||||
m_canReportBugs = canReportBugs;
|
||||
|
||||
|
|
Loading…
Reference in New Issue