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.
master
Monty Brandenberg 2012-09-07 18:55:04 -04:00
parent 67553c99f6
commit 81b9e29a1f
6 changed files with 53 additions and 15 deletions

View File

@ -51,6 +51,7 @@ if (WINDOWS)
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 "")
@ -206,6 +207,10 @@ if (DARWIN)
# 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)

View File

@ -201,6 +201,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
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)

View File

@ -24,7 +24,7 @@ endif (LINUX)
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)

View File

@ -99,10 +99,20 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
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:
@ -134,6 +144,11 @@ set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
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.")

View File

@ -164,7 +164,19 @@ if (LL_TESTS)
${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})

View File

@ -697,10 +697,9 @@ void HttpRequestTestObjectType::test<7>()
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());
@ -1036,10 +1035,9 @@ void HttpRequestTestObjectType::test<10>()
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());
@ -1271,10 +1269,9 @@ void HttpRequestTestObjectType::test<12>()
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());