From 54983bcc890a6e94be091524954449d07992a0ac Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sat, 11 May 2013 23:40:26 +0200 Subject: [PATCH] Fixing some syntactic and build system stupidity --- indra/cmake/00-Common.cmake | 2 -- indra/cmake/Variables.cmake | 1 + indra/libpathing/CMakeLists.txt | 9 ++++++ indra/libpathing/llpathinglib.h | 49 ++++++++------------------------- 4 files changed, 21 insertions(+), 40 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 449186a08..6d1ffd992 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -281,8 +281,6 @@ if (LINUX OR DARWIN) set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS}") endif() - # Use -DDISABLE_FATAL_WARNINGS:BOOL=FALSE during configuration to enable fatal warnings. - set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.") if (NOT DISABLE_FATAL_WARNINGS) set(UNIX_WARNINGS "${UNIX_WARNINGS} -Werror") set(UNIX_CXX_WARNINGS "${UNIX_CXX_WARNINGS} -Werror") diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 5bc3e2156..10dd25ac2 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -30,6 +30,7 @@ set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX}) set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX}) set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)") set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)") +set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.") set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH "Location of prebuilt libraries.") diff --git a/indra/libpathing/CMakeLists.txt b/indra/libpathing/CMakeLists.txt index aea1212e5..61ed087e8 100644 --- a/indra/libpathing/CMakeLists.txt +++ b/indra/libpathing/CMakeLists.txt @@ -1,7 +1,16 @@ # -*- cmake -*- project(libpathing) + include(00-Common) +include(LLCommon) +include(LLMath) + +include_directories( + ${LLCOMMON_INCLUDE_DIRS} + ${LLMATH_INCLUDE_DIRS} +) + if( MSVC ) add_definitions(-D_SECURE_SCL=0 -D_CRT_SECURE_NO_WARNINGS=1) diff --git a/indra/libpathing/llpathinglib.h b/indra/libpathing/llpathinglib.h index 70fd1d767..30dd0110a 100644 --- a/indra/libpathing/llpathinglib.h +++ b/indra/libpathing/llpathinglib.h @@ -3,37 +3,10 @@ #include -#ifndef LL_V3MATH_H -class LLVector3 -{ -public: - float mV[3]; -}; -#endif - -#ifndef LL_V4COLORU_H -class LLColor4U -{ -public: - unsigned char mV[4]; -}; -#endif - -#ifndef LL_LLUUID_H -class LLUUID -{ -public: - unsigned char mData[16]; -}; -#endif - -#ifndef LLQUATERNION_H -class LLQuaternion -{ -public: - double mQ[4]; -}; -#endif +#include "v3math.h" +#include "v4coloru.h" +#include "llquaternion.h" +#include "lluuid.h" class LLRender; @@ -43,7 +16,7 @@ public: enum LLPLResult { LLPL_NO_PATH, - LLPL_PATH_GENERATED_OK, + LLPL_PATH_GENERATED_OK }; enum LLPLCharacterType @@ -52,7 +25,7 @@ public: LLPL_CHARACTER_TYPE_A, LLPL_CHARACTER_TYPE_B, LLPL_CHARACTER_TYPE_C, - LLPL_CHARACTER_TYPE_D, + LLPL_CHARACTER_TYPE_D }; enum LLShapeType @@ -60,13 +33,13 @@ public: LLST_WalkableObjects = 1, LLST_ObstacleObjects = 2, LLST_MaterialPhantoms = 3, - LLST_ExclusionPhantoms = 4, + LLST_ExclusionPhantoms = 4 }; enum LLPLRenderType { LLPL_START, - LLPL_END, + LLPL_END }; struct Vector @@ -87,9 +60,9 @@ public: operator LLVector3() const { LLVector3 ret; - ret.mV[0] = mX; - ret.mV[1] = mY; - ret.mV[2] = mZ; + ret.mV[0] = (F32) mX; + ret.mV[1] = (F32) mY; + ret.mV[2] = (F32) mZ; return ret; } };