From 526effaaca526ff29d9ac7b932ebd8cfaa72cff0 Mon Sep 17 00:00:00 2001 From: Matt Raykowski Date: Thu, 20 May 2010 15:40:16 -0500 Subject: [PATCH] Update: Fixing some warnings and some more CMake work. --- code/ryzom/CMakeLists.txt | 4 ++++ code/ryzom/CMakeModules/nel.cmake | 3 ++- code/ryzom/server/src/admin_modules/CMakeLists.txt | 7 ++----- .../server/src/admin_modules/aes_client_module.cpp | 6 +++--- code/ryzom/server/src/ai_service/CMakeLists.txt | 1 + code/ryzom/server/src/ai_share/CMakeLists.txt | 3 ++- code/ryzom/server/src/ai_share/primitive_parser.cpp | 2 ++ code/ryzom/server/src/server_share/CMakeLists.txt | 11 +++++------ 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index 19fda9ef5..280b302e3 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -106,6 +106,10 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/common ) NL_SETUP_BUILD_FLAGS() +IF(FINAL_VERSION) + ADD_DEFINITIONS(-DFINAL_VERSION=1) +ENDIF(FINAL_VERSION) + ADD_SUBDIRECTORY(common) IF(WITH_CLIENT) diff --git a/code/ryzom/CMakeModules/nel.cmake b/code/ryzom/CMakeModules/nel.cmake index 13de31a56..c452fe5f0 100644 --- a/code/ryzom/CMakeModules/nel.cmake +++ b/code/ryzom/CMakeModules/nel.cmake @@ -25,7 +25,8 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_CLIENT "Build Ryzom Core Client" ON ) OPTION(WITH_TOOLS "Build Ryzom Core Tools" ON ) OPTION(WITH_SERVER "Build Ryzom Core Services" ON ) - OPTION(WITH_LUA51 "Build Ryzom Core using Lua51" OFF) + OPTION(WITH_LUA51 "Build Ryzom Core using Lua51" ON ) + OPTION(FINAL_VERSION "Build in Final Version mode" ON ) ### # Features diff --git a/code/ryzom/server/src/admin_modules/CMakeLists.txt b/code/ryzom/server/src/admin_modules/CMakeLists.txt index 10963871a..a31ca9921 100644 --- a/code/ryzom/server/src/admin_modules/CMakeLists.txt +++ b/code/ryzom/server/src/admin_modules/CMakeLists.txt @@ -3,11 +3,8 @@ FILE(GLOB SRC *.cpp *.h) # Filter out the source files not actually compiled. LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp) -IF(WIN32) - ADD_LIBRARY(admin_modules STATIC ${SRC}) -ELSE(WIN32) - ADD_LIBRARY(admin_modules SHARED ${SRC}) -ENDIF(WIN32) + +ADD_LIBRARY(admin_modules STATIC ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) TARGET_LINK_LIBRARIES(admin_modules ${NELMISC_LIBRARY}) diff --git a/code/ryzom/server/src/admin_modules/aes_client_module.cpp b/code/ryzom/server/src/admin_modules/aes_client_module.cpp index 44963d3f0..5c0a53df3 100644 --- a/code/ryzom/server/src/admin_modules/aes_client_module.cpp +++ b/code/ryzom/server/src/admin_modules/aes_client_module.cpp @@ -117,9 +117,9 @@ namespace ADMIN CAdminExecutorServiceClient() : _DontUseShardOrders(false), - _ProcessUsedMemory(0), _LastStateReport(0), - _LastStatusStringReport(0) + _LastStatusStringReport(0), + _ProcessUsedMemory(0) { CAdminExecutorServiceClientSkel::init(this); @@ -186,7 +186,7 @@ namespace ADMIN // loop for an optionnal 'dontUseShardOrders' flag in init params const TParsedCommandLine *duso = pcl.getParam("dontUseShardOrders"); if (duso != NULL) - _DontUseShardOrders = (duso->ParamValue == "true" | duso->ParamName == "1"); + _DontUseShardOrders = (duso->ParamValue == "true" || duso->ParamName == "1"); return true; } diff --git a/code/ryzom/server/src/ai_service/CMakeLists.txt b/code/ryzom/server/src/ai_service/CMakeLists.txt index 86c8d6a14..684deab3d 100644 --- a/code/ryzom/server/src/ai_service/CMakeLists.txt +++ b/code/ryzom/server/src/ai_service/CMakeLists.txt @@ -23,6 +23,7 @@ ADD_EXECUTABLE(ai_service ${SRC}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/server/src ${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(ai_service admin_modules game_share + server_share ai_share ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} diff --git a/code/ryzom/server/src/ai_share/CMakeLists.txt b/code/ryzom/server/src/ai_share/CMakeLists.txt index 90984c934..3a4e3148b 100644 --- a/code/ryzom/server/src/ai_share/CMakeLists.txt +++ b/code/ryzom/server/src/ai_share/CMakeLists.txt @@ -1,7 +1,8 @@ FILE(GLOB SRC *.cpp *.h) # Filter out the source files not actually compiled. -#LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp) +LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/world_map.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/world_map.h) ADD_LIBRARY(ai_share STATIC ${SRC}) diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index 497990b05..e55f4dd21 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -3232,6 +3232,8 @@ static void parsePrimSquadTemplate(const IPrimitive *prim, const std::string &ma case AITypeSquadTemplateVariant: parsePrimSquadTemplateVariant(nextTreeNode(aliasNode,child), child, name); break; + default: + break; } } } diff --git a/code/ryzom/server/src/server_share/CMakeLists.txt b/code/ryzom/server/src/server_share/CMakeLists.txt index 1b76d0e95..30c33dc9f 100644 --- a/code/ryzom/server/src/server_share/CMakeLists.txt +++ b/code/ryzom/server/src/server_share/CMakeLists.txt @@ -3,14 +3,13 @@ FILE(GLOB SRC *.cpp *.h) # Filter out the source files not actually compiled. #LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp) -IF(WIN32) - ADD_LIBRARY(server_share STATIC ${SRC}) -ELSE(WIN32) - ADD_LIBRARY(server_share SHARED ${SRC}) -ENDIF(WIN32) +ADD_LIBRARY(server_share STATIC ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(server_share ${NELMISC_LIBRARY} ${NELPACS_LIBRARY} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES}) +TARGET_LINK_LIBRARIES(server_share ${NELMISC_LIBRARY} + ${NELPACS_LIBRARY} + ${MYSQL_LIBRARIES} + ${ZLIB_LIBRARIES}) SET_TARGET_PROPERTIES(server_share PROPERTIES VERSION ${NL_VERSION}) IF(WIN32)