Newer
Older
Bryan O'Sullivan
committed
# -*- cmake -*-
project(llcommon)
include(00-Common)
include(LLCommon)
include(LLSharedLibs)
brad kittenbrink
committed
include(GoogleBreakpad)
include(GooglePerfTools)
include(Copy3rdPartyLibs)
Bryan O'Sullivan
committed
include_directories(
${EXPAT_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
Bryan O'Sullivan
committed
)
# add_executable(lltreeiterators lltreeiterators.cpp)
#
# target_link_libraries(lltreeiterators
# ${LLCOMMON_LIBRARIES})
Bryan O'Sullivan
committed
set(llcommon_SOURCE_FILES
llallocator.cpp
llallocator_heap_profile.cpp
Bryan O'Sullivan
committed
llapp.cpp
llapr.cpp
llassettype.cpp
llbase32.cpp
llbase64.cpp
Richard Linden
committed
llbitpack.cpp
Bryan O'Sullivan
committed
llcommon.cpp
Dmitry Zaporozhan
committed
llcommonutils.cpp
llcoros.cpp
Bryan O'Sullivan
committed
llcrc.cpp
llcriticaldamp.cpp
lldate.cpp
lldictionary.cpp
Bryan O'Sullivan
committed
llerror.cpp
llerrorthread.cpp
llevent.cpp
lleventapi.cpp
lleventdispatcher.cpp
lleventtimer.cpp
Bryan O'Sullivan
committed
llfile.cpp
llfindlocale.cpp
llfixedbuffer.cpp
llformat.cpp
llframetimer.cpp
llheartbeat.cpp
brad kittenbrink
committed
llinstancetracker.cpp
llleaplistener.cpp
Bryan O'Sullivan
committed
llliveappconfig.cpp
lllivefile.cpp
llmd5.cpp
llmemory.cpp
llmemorystream.cpp
llmetrics.cpp
llmetricperformancetester.cpp
Bryan O'Sullivan
committed
llmortician.cpp
Bryan O'Sullivan
committed
llprocessor.cpp
llqueuedthread.cpp
llrand.cpp
Bryan O'Sullivan
committed
llrun.cpp
llsd.cpp
Richard Linden
committed
llsdparam.cpp
Bryan O'Sullivan
committed
llsdserialize.cpp
llsdserialize_xml.cpp
llsdutil.cpp
llsingleton.cpp
llstacktrace.cpp
Bryan O'Sullivan
committed
llstreamtools.cpp
llstring.cpp
llstringtable.cpp
llsys.cpp
llthread.cpp
Richard Linden
committed
llthreadlocalstorage.cpp
Bryan O'Sullivan
committed
lltimer.cpp
Richard Linden
committed
lltraceaccumulators.cpp
lltracethreadrecorder.cpp
Bryan O'Sullivan
committed
lluri.cpp
lluuid.cpp
llworkerthread.cpp
timing.cpp
u64.cpp
)
set(llcommon_HEADER_FILES
CMakeLists.txt
ctype_workaround.h
fix_macros.h
Bryan O'Sullivan
committed
indra_constants.h
linden_common.h
llallocator.h
llallocator_heap_profile.h
Bryan O'Sullivan
committed
llapp.h
llapr.h
llassettype.h
llbase32.h
llbase64.h
Richard Linden
committed
llbitpack.h
Bryan O'Sullivan
committed
llboost.h
llcommon.h
Dmitry Zaporozhan
committed
llcommonutils.h
llcoros.h
Bryan O'Sullivan
committed
llcrc.h
llcriticaldamp.h
lldate.h
lldefs.h
Bryan O'Sullivan
committed
lldepthstack.h
lldictionary.h
lldoubledispatch.h
Bryan O'Sullivan
committed
llendianswizzle.h
llerror.h
llerrorcontrol.h
llerrorthread.h
llevent.h
lleventapi.h
lleventdispatcher.h
Bryan O'Sullivan
committed
lleventemitter.h
llfasttimer.h
llfile.h
llfindlocale.h
llfixedbuffer.h
llformat.h
llframetimer.h
llhandle.h
Bryan O'Sullivan
committed
llhash.h
llheartbeat.h
llhttpstatuscodes.h
Richard Linden
committed
llindexedvector.h
llinstancetracker.h
Bryan O'Sullivan
committed
llkeythrottle.h
llleaplistener.h
lllistenerwrapper.h
Bryan O'Sullivan
committed
llliveappconfig.h
lllivefile.h
llmd5.h
llmemory.h
llmemorystream.h
llmetrics.h
llmetricperformancetester.h
Bryan O'Sullivan
committed
llmortician.h
Bryan O'Sullivan
committed
llpreprocessor.h
llpriqueuemap.h
Bryan O'Sullivan
committed
llprocessor.h
Bryan O'Sullivan
committed
llqueuedthread.h
llrand.h
Bryan O'Sullivan
committed
llrun.h
llrefcount.h
llsafehandle.h
Bryan O'Sullivan
committed
llsd.h
Richard Linden
committed
llsdparam.h
Bryan O'Sullivan
committed
llsdserialize.h
llsdserialize_xml.h
llsdutil.h
llsimplehash.h
llsingleton.h
llstacktrace.h
Bryan O'Sullivan
committed
llstl.h
Bryan O'Sullivan
committed
llstreamtools.h
llstrider.h
llstring.h
llstringtable.h
llsys.h
llthread.h
llthreadlocalstorage.h
Bryan O'Sullivan
committed
lltimer.h
Richard Linden
committed
lltraceaccumulators.h
lltracethreadrecorder.h
lltreeiterators.h
Bryan O'Sullivan
committed
lluri.h
lluuid.h
Bryan O'Sullivan
committed
llworkerthread.h
stdtypes.h
Bryan O'Sullivan
committed
timer.h
u64.h
)
set_source_files_properties(${llcommon_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
Boroondas Gupte
committed
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# always generate llcommon.pdb, even for "Release" builds
set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG")
endif(WINDOWS)
Boroondas Gupte
committed
ll_stage_sharedlib(llcommon)
else(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES})
endif(LLCOMMON_LINK_SHARED)
target_link_libraries(
llcommon
brad kittenbrink
committed
${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
${APRUTIL_LIBRARIES}
${APR_LIBRARIES}
${EXPAT_LIBRARIES}
${ZLIB_LIBRARIES}
${BOOST_PROGRAM_OPTIONS_LIBRARY}
${BOOST_REGEX_LIBRARY}
${GOOGLE_PERFTOOLS_LIBRARIES}
Leslie Linden
committed
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CARBON_LIBRARY Carbon)
target_link_libraries(llcommon ${CARBON_LIBRARY})
endif (DARWIN)
Mark Palange (Mani)
committed
add_dependencies(llcommon stage_third_party_libs)
if (LL_TESTS)
include(LLAddBuildTest)
SET(llcommon_TEST_SOURCE_FILES
# unit-testing llcommon is not possible right now as the test-harness *itself* depends upon llcommon, causing a circular dependency. Add your 'unit' tests as integration tests for now.
)
LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
set(test_libs llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${GOOGLEMOCK_LIBRARIES})
LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llbase64 "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lldate "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lldependencies "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llerror "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llinstancetracker "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}")
Logan Dethrow
committed
LL_ADD_INTEGRATION_TEST(llsingleton "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lltrace "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llunits "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lleventcoro "" "${test_libs};${BOOST_CONTEXT_LIBRARY}")
LL_ADD_INTEGRATION_TEST(llprocess "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llleap "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llstreamqueue "" "${test_libs}")
# *TODO - reenable these once tcmalloc libs no longer break the build.
#ADD_BUILD_TEST(llallocator llcommon)
#ADD_BUILD_TEST(llallocator_heap_profile llcommon)
#ADD_BUILD_TEST(llmemtype llcommon)
endif (LL_TESTS)