Commits

Monty Brandenberg committed dda1aaf

DRTVWR-209 Merge of viewer-development with SH-3316 drano-http code.
Cmake files not merged correctly and had to be done by hand. New memory
allocation made some memory usage tests in the llcorehttp integration
tests no longer valid. Would like to work on LLLog sometime and get
it to be consistent. Special flags needed for windows build of example
program.

Comments (0)

Files changed (6)

indra/cmake/00-Common.cmake

   set(CMAKE_CXX_FLAGS_RELEASE
       "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
       CACHE STRING "C++ compiler release options" FORCE)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
 
   set(CMAKE_CXX_STANDARD_LIBRARIES "")
   set(CMAKE_C_STANDARD_LIBRARIES "")
   # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+  if (XCODE_VERSION GREATER 4.2)
+    set(ENABLE_SIGNING TRUE)
+    set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
+  endif (XCODE_VERSION GREATER 4.2)
 endif (DARWIN)
 
 

indra/cmake/LLAddBuildTest.cmake

   endif(TEST_DEBUG)
   ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
   SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+  if (WINDOWS)
+    set_target_properties(INTEGRATION_TEST_${testname}
+      PROPERTIES 
+      LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
+      LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
+      LINK_FLAGS_RELEASE ""
+      )
+  endif(WINDOWS)
+
   if(STANDALONE)
     SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
   endif(STANDALONE)

indra/cmake/LLCommon.cmake

 
 add_definitions(${TCMALLOC_FLAG})
 
-set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
+set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
 if(LLCOMMON_LINK_SHARED)
   add_definitions(-DLL_COMMON_LINK_SHARED=1)
 endif(LLCOMMON_LINK_SHARED)

indra/cmake/Variables.cmake

 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   set(DARWIN 1)
   
+  execute_process(
+    COMMAND sh -c "xcodebuild -version | grep Xcode  | cut -d ' ' -f2 | cut -d'.' -f1-2"
+    OUTPUT_VARIABLE XCODE_VERSION )
+
   # To support a different SDK update these Xcode settings:
-  set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+  if (XCODE_VERSION GREATER 4.2)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
+  else (XCODE_VERSION GREATER 4.2)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+  endif (XCODE_VERSION GREATER 4.2)
+
   set(CMAKE_OSX_SYSROOT macosx10.6)
   set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
+      
   set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
 
   # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
 set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
 set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
 
+if (XCODE_VERSION GREATER 4.2)
+  set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
+  set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
+endif (XCODE_VERSION GREATER 4.2)
+
 set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
 set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.")

indra/llcorehttp/CMakeLists.txt

                  ${llcorehttp_EXAMPLE_SOURCE_FILES}
                  )
   set_target_properties(http_texture_load
-                        PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+                        PROPERTIES
+                        RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}"
+                        )
+
+  if (WINDOWS)
+    # The following come from LLAddBuildTest.cmake's INTEGRATION_TEST_xxxx target.
+    set_target_properties(http_texture_load
+                          PROPERTIES
+                          LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
+                          LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
+                          LINK_FLAGS_RELEASE ""
+                          )
+  endif (WINDOWS)
 
   target_link_libraries(http_texture_load ${example_libs})
 

indra/llcorehttp/tests/test_httprequest.hpp

 	
 		ensure("Two handler calls on the way out", 2 == mHandlerCalls);
 
-#if defined(WIN32)
-		// Can only do this memory test on Windows.  On other platforms,
-		// the LL logging system holds on to memory and produces what looks
-		// like memory leaks...
+#if 0 // defined(WIN32)
+		// Can't do this on any platform anymore, the LL logging system holds
+		// on to memory and produces what looks like memory leaks...
 	
 		// printf("Old mem:  %d, New mem:  %d\n", mMemTotal, GetMemTotal());
 		ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal());
 	
 		ensure("Two handler calls on the way out", 2 == mHandlerCalls);
 
-#if defined(WIN32)
-		// Can only do this memory test on Windows.  On other platforms,
-		// the LL logging system holds on to memory and produces what looks
-		// like memory leaks...
+#if 0 // defined(WIN32)
+		// Can't do this on any platform anymore, the LL logging system holds
+		// on to memory and produces what looks like memory leaks...
 	
 		// printf("Old mem:  %d, New mem:  %d\n", mMemTotal, GetMemTotal());
 		ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal());
 	
 		ensure("Two handler calls on the way out", 2 == mHandlerCalls);
 
-#if defined(WIN32)
-		// Can only do this memory test on Windows.  On other platforms,
-		// the LL logging system holds on to memory and produces what looks
-		// like memory leaks...
+#if 0	// defined(WIN32)
+		// Can't do this on any platform anymore, the LL logging system holds
+		// on to memory and produces what looks like memory leaks...
 	
 		// printf("Old mem:  %d, New mem:  %d\n", mMemTotal, GetMemTotal());
 		ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal());