CMakeLists.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. #
  2. # Copyright 2017 The Abseil Authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # https://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. absl_cc_library(
  17. NAME
  18. graphcycles_internal
  19. HDRS
  20. "internal/graphcycles.h"
  21. SRCS
  22. "internal/graphcycles.cc"
  23. COPTS
  24. ${ABSL_DEFAULT_COPTS}
  25. DEPS
  26. absl::base
  27. absl::base_internal
  28. absl::config
  29. absl::core_headers
  30. absl::malloc_internal
  31. absl::raw_logging_internal
  32. )
  33. absl_cc_library(
  34. NAME
  35. kernel_timeout_internal
  36. HDRS
  37. "internal/kernel_timeout.h"
  38. COPTS
  39. ${ABSL_DEFAULT_COPTS}
  40. DEPS
  41. absl::core_headers
  42. absl::raw_logging_internal
  43. absl::time
  44. )
  45. absl_cc_library(
  46. NAME
  47. synchronization
  48. HDRS
  49. "barrier.h"
  50. "blocking_counter.h"
  51. "internal/create_thread_identity.h"
  52. "internal/futex.h"
  53. "internal/per_thread_sem.h"
  54. "internal/waiter.h"
  55. "mutex.h"
  56. "notification.h"
  57. SRCS
  58. "barrier.cc"
  59. "blocking_counter.cc"
  60. "internal/create_thread_identity.cc"
  61. "internal/per_thread_sem.cc"
  62. "internal/waiter.cc"
  63. "notification.cc"
  64. "mutex.cc"
  65. COPTS
  66. ${ABSL_DEFAULT_COPTS}
  67. DEPS
  68. absl::graphcycles_internal
  69. absl::kernel_timeout_internal
  70. absl::atomic_hook
  71. absl::base
  72. absl::base_internal
  73. absl::config
  74. absl::core_headers
  75. absl::dynamic_annotations
  76. absl::malloc_internal
  77. absl::raw_logging_internal
  78. absl::stacktrace
  79. absl::symbolize
  80. absl::time
  81. Threads::Threads
  82. PUBLIC
  83. )
  84. absl_cc_test(
  85. NAME
  86. barrier_test
  87. SRCS
  88. "barrier_test.cc"
  89. COPTS
  90. ${ABSL_TEST_COPTS}
  91. DEPS
  92. absl::synchronization
  93. absl::time
  94. GTest::gmock_main
  95. )
  96. absl_cc_test(
  97. NAME
  98. blocking_counter_test
  99. SRCS
  100. "blocking_counter_test.cc"
  101. COPTS
  102. ${ABSL_TEST_COPTS}
  103. DEPS
  104. absl::synchronization
  105. absl::time
  106. GTest::gmock_main
  107. )
  108. absl_cc_test(
  109. NAME
  110. graphcycles_test
  111. SRCS
  112. "internal/graphcycles_test.cc"
  113. COPTS
  114. ${ABSL_TEST_COPTS}
  115. DEPS
  116. absl::graphcycles_internal
  117. absl::core_headers
  118. absl::raw_logging_internal
  119. GTest::gmock_main
  120. )
  121. absl_cc_library(
  122. NAME
  123. thread_pool
  124. HDRS
  125. "internal/thread_pool.h"
  126. COPTS
  127. ${ABSL_DEFAULT_COPTS}
  128. DEPS
  129. absl::synchronization
  130. absl::core_headers
  131. TESTONLY
  132. )
  133. absl_cc_test(
  134. NAME
  135. mutex_test
  136. SRCS
  137. "mutex_test.cc"
  138. COPTS
  139. ${ABSL_TEST_COPTS}
  140. DEPS
  141. absl::synchronization
  142. absl::thread_pool
  143. absl::base
  144. absl::config
  145. absl::core_headers
  146. absl::memory
  147. absl::raw_logging_internal
  148. absl::time
  149. GTest::gmock_main
  150. )
  151. absl_cc_test(
  152. NAME
  153. notification_test
  154. SRCS
  155. "notification_test.cc"
  156. COPTS
  157. ${ABSL_TEST_COPTS}
  158. DEPS
  159. absl::synchronization
  160. absl::time
  161. GTest::gmock_main
  162. )
  163. absl_cc_library(
  164. NAME
  165. per_thread_sem_test_common
  166. SRCS
  167. "internal/per_thread_sem_test.cc"
  168. COPTS
  169. ${ABSL_TEST_COPTS}
  170. DEPS
  171. absl::synchronization
  172. absl::base
  173. absl::config
  174. absl::strings
  175. absl::time
  176. GTest::gmock
  177. TESTONLY
  178. )
  179. absl_cc_test(
  180. NAME
  181. per_thread_sem_test
  182. SRCS
  183. "internal/per_thread_sem_test.cc"
  184. COPTS
  185. ${ABSL_TEST_COPTS}
  186. DEPS
  187. absl::per_thread_sem_test_common
  188. absl::synchronization
  189. absl::strings
  190. absl::time
  191. GTest::gmock_main
  192. )
  193. absl_cc_test(
  194. NAME
  195. lifetime_test
  196. SRCS
  197. "lifetime_test.cc"
  198. COPTS
  199. ${ABSL_TEST_COPTS}
  200. DEPS
  201. absl::synchronization
  202. absl::core_headers
  203. absl::raw_logging_internal
  204. )