PageRenderTime 64ms CodeModel.GetById 1ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 334 lines | 305 code | 17 blank | 12 comment | 6 complexity | 5b49fb96931fa4717b39a26e4a4ba8b8 MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. project(llcommon)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(Linking)
  6. include(Boost)
  7. include(LLSharedLibs)
  8. include(GoogleBreakpad)
  9. include(GooglePerfTools)
  10. include(Copy3rdPartyLibs)
  11. include(ZLIB)
  12. include_directories(
  13. ${EXPAT_INCLUDE_DIRS}
  14. ${LLCOMMON_INCLUDE_DIRS}
  15. ${ZLIB_INCLUDE_DIRS}
  16. )
  17. # add_executable(lltreeiterators lltreeiterators.cpp)
  18. #
  19. # target_link_libraries(lltreeiterators
  20. # ${LLCOMMON_LIBRARIES})
  21. set(llcommon_SOURCE_FILES
  22. imageids.cpp
  23. indra_constants.cpp
  24. llallocator.cpp
  25. llallocator_heap_profile.cpp
  26. llapp.cpp
  27. llapr.cpp
  28. llassettype.cpp
  29. llavatarname.cpp
  30. llbase32.cpp
  31. llbase64.cpp
  32. llcommon.cpp
  33. llcommonutils.cpp
  34. llcoros.cpp
  35. llcrc.cpp
  36. llcriticaldamp.cpp
  37. llcursortypes.cpp
  38. lldate.cpp
  39. lldependencies.cpp
  40. lldictionary.cpp
  41. llerror.cpp
  42. llerrorthread.cpp
  43. llevent.cpp
  44. lleventapi.cpp
  45. lleventcoro.cpp
  46. lleventdispatcher.cpp
  47. lleventfilter.cpp
  48. llevents.cpp
  49. lleventtimer.cpp
  50. llfasttimer_class.cpp
  51. llfile.cpp
  52. llfindlocale.cpp
  53. llfixedbuffer.cpp
  54. llfoldertype.cpp
  55. llformat.cpp
  56. llframetimer.cpp
  57. llheartbeat.cpp
  58. llinstancetracker.cpp
  59. llliveappconfig.cpp
  60. lllivefile.cpp
  61. lllog.cpp
  62. llmd5.cpp
  63. llmemory.cpp
  64. llmemorystream.cpp
  65. llmemtype.cpp
  66. llmetrics.cpp
  67. llmetricperformancetester.cpp
  68. llmortician.cpp
  69. lloptioninterface.cpp
  70. llptrto.cpp
  71. llprocesslauncher.cpp
  72. llprocessor.cpp
  73. llqueuedthread.cpp
  74. llrand.cpp
  75. llrefcount.cpp
  76. llrun.cpp
  77. llsd.cpp
  78. llsdserialize.cpp
  79. llsdserialize_xml.cpp
  80. llsdutil.cpp
  81. llsecondlifeurls.cpp
  82. llsingleton.cpp
  83. llstat.cpp
  84. llstacktrace.cpp
  85. llstreamtools.cpp
  86. llstring.cpp
  87. llstringtable.cpp
  88. llsys.cpp
  89. llthread.cpp
  90. llthreadsafequeue.cpp
  91. lltimer.cpp
  92. lluri.cpp
  93. lluuid.cpp
  94. llworkerthread.cpp
  95. metaclass.cpp
  96. metaproperty.cpp
  97. reflective.cpp
  98. timing.cpp
  99. u64.cpp
  100. )
  101. set(llcommon_HEADER_FILES
  102. CMakeLists.txt
  103. bitpack.h
  104. ctype_workaround.h
  105. doublelinkedlist.h
  106. imageids.h
  107. indra_constants.h
  108. linden_common.h
  109. linked_lists.h
  110. llaccountingcost.h
  111. llallocator.h
  112. llallocator_heap_profile.h
  113. llagentconstants.h
  114. llavatarname.h
  115. llapp.h
  116. llapr.h
  117. llassettype.h
  118. llassoclist.h
  119. llavatarconstants.h
  120. llbase32.h
  121. llbase64.h
  122. llboost.h
  123. llchat.h
  124. llclickaction.h
  125. llcommon.h
  126. llcommonutils.h
  127. llcoros.h
  128. llcrc.h
  129. llcriticaldamp.h
  130. llcursortypes.h
  131. lldarray.h
  132. lldarrayptr.h
  133. lldate.h
  134. lldefs.h
  135. lldependencies.h
  136. lldeleteutils.h
  137. lldepthstack.h
  138. lldictionary.h
  139. lldlinked.h
  140. lldoubledispatch.h
  141. lldqueueptr.h
  142. llendianswizzle.h
  143. llenum.h
  144. llerror.h
  145. llerrorcontrol.h
  146. llerrorlegacy.h
  147. llerrorthread.h
  148. llevent.h
  149. lleventapi.h
  150. lleventcoro.h
  151. lleventdispatcher.h
  152. lleventfilter.h
  153. llevents.h
  154. lleventemitter.h
  155. llextendedstatus.h
  156. llfasttimer.h
  157. llfasttimer_class.h
  158. llfile.h
  159. llfindlocale.h
  160. llfixedbuffer.h
  161. llfoldertype.h
  162. llformat.h
  163. llframetimer.h
  164. llhash.h
  165. llheartbeat.h
  166. llhttpstatuscodes.h
  167. llindexedqueue.h
  168. llinstancetracker.h
  169. llkeythrottle.h
  170. lllazy.h
  171. lllistenerwrapper.h
  172. lllinkedqueue.h
  173. llliveappconfig.h
  174. lllivefile.h
  175. lllocalidhashmap.h
  176. lllog.h
  177. lllslconstants.h
  178. llmap.h
  179. llmd5.h
  180. llmemory.h
  181. llmemorystream.h
  182. llmemtype.h
  183. llmetrics.h
  184. llmetricperformancetester.h
  185. llmortician.h
  186. llnametable.h
  187. lloptioninterface.h
  188. llpointer.h
  189. llpreprocessor.h
  190. llpriqueuemap.h
  191. llprocesslauncher.h
  192. llprocessor.h
  193. llptrskiplist.h
  194. llptrskipmap.h
  195. llptrto.h
  196. llqueuedthread.h
  197. llrand.h
  198. llrefcount.h
  199. llrun.h
  200. llrefcount.h
  201. llsafehandle.h
  202. llsd.h
  203. llsdserialize.h
  204. llsdserialize_xml.h
  205. llsdutil.h
  206. llsecondlifeurls.h
  207. llsimplehash.h
  208. llsingleton.h
  209. llskiplist.h
  210. llskipmap.h
  211. llstack.h
  212. llstacktrace.h
  213. llstat.h
  214. llstatenums.h
  215. llstl.h
  216. llstreamtools.h
  217. llstrider.h
  218. llstring.h
  219. llstringtable.h
  220. llsys.h
  221. llthread.h
  222. llthreadsafequeue.h
  223. lltimer.h
  224. lltreeiterators.h
  225. lluri.h
  226. lluuid.h
  227. lluuidhashmap.h
  228. llversionserver.h
  229. llversionviewer.h
  230. llworkerthread.h
  231. ll_template_cast.h
  232. metaclass.h
  233. metaclasst.h
  234. metaproperty.h
  235. metapropertyt.h
  236. reflective.h
  237. reflectivet.h
  238. roles_constants.h
  239. stdenums.h
  240. stdtypes.h
  241. string_table.h
  242. stringize.h
  243. timer.h
  244. timing.h
  245. u64.h
  246. )
  247. set_source_files_properties(${llcommon_HEADER_FILES}
  248. PROPERTIES HEADER_FILE_ONLY TRUE)
  249. list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
  250. if(LLCOMMON_LINK_SHARED)
  251. add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
  252. if(NOT WORD_SIZE EQUAL 32)
  253. if(WINDOWS)
  254. add_definitions(/FIXED:NO)
  255. else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
  256. add_definitions(-fPIC)
  257. endif(WINDOWS)
  258. endif(NOT WORD_SIZE EQUAL 32)
  259. if(WINDOWS)
  260. # always generate llcommon.pdb, even for "Release" builds
  261. set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG")
  262. endif(WINDOWS)
  263. ll_stage_sharedlib(llcommon)
  264. else(LLCOMMON_LINK_SHARED)
  265. add_library (llcommon ${llcommon_SOURCE_FILES})
  266. endif(LLCOMMON_LINK_SHARED)
  267. target_link_libraries(
  268. llcommon
  269. ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
  270. ${APRUTIL_LIBRARIES}
  271. ${APR_LIBRARIES}
  272. ${EXPAT_LIBRARIES}
  273. ${ZLIB_LIBRARIES}
  274. ${WINDOWS_LIBRARIES}
  275. ${BOOST_PROGRAM_OPTIONS_LIBRARY}
  276. ${BOOST_REGEX_LIBRARY}
  277. ${GOOGLE_PERFTOOLS_LIBRARIES}
  278. )
  279. if (DARWIN)
  280. include(CMakeFindFrameworks)
  281. find_library(CARBON_LIBRARY Carbon)
  282. target_link_libraries(llcommon ${CARBON_LIBRARY})
  283. endif (DARWIN)
  284. add_dependencies(llcommon stage_third_party_libs)
  285. if (LL_TESTS)
  286. include(LLAddBuildTest)
  287. SET(llcommon_TEST_SOURCE_FILES
  288. # 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.
  289. )
  290. LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}")
  291. #set(TEST_DEBUG on)
  292. set(test_libs llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${GOOGLEMOCK_LIBRARIES})
  293. LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
  294. LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}")
  295. LL_ADD_INTEGRATION_TEST(llbase64 "" "${test_libs}")
  296. LL_ADD_INTEGRATION_TEST(lldate "" "${test_libs}")
  297. LL_ADD_INTEGRATION_TEST(lldependencies "" "${test_libs}")
  298. LL_ADD_INTEGRATION_TEST(llerror "" "${test_libs}")
  299. LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")
  300. LL_ADD_INTEGRATION_TEST(llinstancetracker "" "${test_libs}")
  301. LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}")
  302. LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")
  303. LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")
  304. LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}"
  305. "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/tests/setpython.py")
  306. LL_ADD_INTEGRATION_TEST(llsingleton "" "${test_libs}")
  307. LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
  308. LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
  309. LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
  310. LL_ADD_INTEGRATION_TEST(reflection "" "${test_libs}")
  311. LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")
  312. LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
  313. # *TODO - reenable these once tcmalloc libs no longer break the build.
  314. #ADD_BUILD_TEST(llallocator llcommon)
  315. #ADD_BUILD_TEST(llallocator_heap_profile llcommon)
  316. #ADD_BUILD_TEST(llmemtype llcommon)
  317. endif (LL_TESTS)