diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-06 13:01:17 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-06 13:01:17 -0500 |
commit | bfe6e94f5388b887253ba77f633ae332affe9f92 (patch) | |
tree | 06169f9e4e8cb30b52b779e9a67d1bd2633577b1 /indra/cmake | |
parent | d3b0a1375509f772ec3ddbc790b5a5d9f4fa7594 (diff) |
SH-2789 WIP - fixing the LL_USE_TCMALLOC code, make tests build with the same tcmalloc options as the sl executable
Diffstat (limited to 'indra/cmake')
-rwxr-xr-x | indra/cmake/GooglePerfTools.cmake | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/cmake/LLAddBuildTest.cmake | 9 |
2 files changed, 18 insertions, 7 deletions
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 834da6d9b8..09501e0406 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -14,8 +14,10 @@ else (STANDALONE) set(TCMALLOC_LIBRARIES debug libtcmalloc_minimal-debug optimized libtcmalloc_minimal) + set(TCMALLOC_LINK_FLAGS "/INCLUDE:__tcmalloc") else (USE_TCMALLOC) set(TCMALLOC_LIBRARIES) + set(TCMALLOC_LINK_FLAGS) endif (USE_TCMALLOC) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (WINDOWS) @@ -44,13 +46,13 @@ if (WINDOWS) set(USE_GOOGLE_PERFTOOLS ON) endif (WINDOWS) -# Apparently buggy - LL_USE_TCMALLOC never gets set. Fix when we have time to test the -# corresponding source code. -if (USE_TCMALLOC) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) # was -ULL_USE_TCMALLOC=1 which makes no sense. -else (USE_TCMALLOC) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) -endif (USE_TCMALLOC) +if (USE_GOOGLE_PERFTOOLS) + if (USE_TCMALLOC) + set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) + else (USE_TCMALLOC) + set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) + endif (USE_TCMALLOC) +endif (USE_GOOGLE_PERFTOOLS) if (USE_GOOGLE_PERFTOOLS) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 08feab6e36..a6f69a09e9 100644..100755 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -205,6 +205,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") endif(STANDALONE) + if (WINDOWS) + SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} + PROPERTIES + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" + LINK_FLAGS_RELEASE "" + ) + endif (WINDOWS) + # Add link deps to the executable if(TEST_DEBUG) message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})") |