CMakeLists.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. time
  19. HDRS
  20. "civil_time.h"
  21. "clock.h"
  22. "time.h"
  23. SRCS
  24. "civil_time.cc"
  25. "clock.cc"
  26. "duration.cc"
  27. "format.cc"
  28. "internal/get_current_time_chrono.inc"
  29. "internal/get_current_time_posix.inc"
  30. "time.cc"
  31. COPTS
  32. ${ABSL_DEFAULT_COPTS}
  33. DEPS
  34. absl::base
  35. absl::civil_time
  36. absl::core_headers
  37. absl::int128
  38. absl::raw_logging_internal
  39. absl::strings
  40. absl::time_zone
  41. PUBLIC
  42. )
  43. absl_cc_library(
  44. NAME
  45. civil_time
  46. HDRS
  47. "internal/cctz/include/cctz/civil_time.h"
  48. "internal/cctz/include/cctz/civil_time_detail.h"
  49. SRCS
  50. "internal/cctz/src/civil_time_detail.cc"
  51. COPTS
  52. ${ABSL_DEFAULT_COPTS}
  53. )
  54. if(APPLE)
  55. find_library(CoreFoundation CoreFoundation)
  56. endif()
  57. absl_cc_library(
  58. NAME
  59. time_zone
  60. HDRS
  61. "internal/cctz/include/cctz/time_zone.h"
  62. "internal/cctz/include/cctz/zone_info_source.h"
  63. SRCS
  64. "internal/cctz/src/time_zone_fixed.cc"
  65. "internal/cctz/src/time_zone_fixed.h"
  66. "internal/cctz/src/time_zone_format.cc"
  67. "internal/cctz/src/time_zone_if.cc"
  68. "internal/cctz/src/time_zone_if.h"
  69. "internal/cctz/src/time_zone_impl.cc"
  70. "internal/cctz/src/time_zone_impl.h"
  71. "internal/cctz/src/time_zone_info.cc"
  72. "internal/cctz/src/time_zone_info.h"
  73. "internal/cctz/src/time_zone_libc.cc"
  74. "internal/cctz/src/time_zone_libc.h"
  75. "internal/cctz/src/time_zone_lookup.cc"
  76. "internal/cctz/src/time_zone_posix.cc"
  77. "internal/cctz/src/time_zone_posix.h"
  78. "internal/cctz/src/tzfile.h"
  79. "internal/cctz/src/zone_info_source.cc"
  80. COPTS
  81. ${ABSL_DEFAULT_COPTS}
  82. DEPS
  83. $<$<PLATFORM_ID:Darwin>:${CoreFoundation}>
  84. )
  85. absl_cc_library(
  86. NAME
  87. time_internal_test_util
  88. HDRS
  89. "internal/test_util.h"
  90. SRCS
  91. "internal/test_util.cc"
  92. "internal/zoneinfo.inc"
  93. COPTS
  94. ${ABSL_DEFAULT_COPTS}
  95. DEPS
  96. absl::time
  97. absl::config
  98. absl::raw_logging_internal
  99. absl::time_zone
  100. GTest::gmock
  101. TESTONLY
  102. )
  103. absl_cc_test(
  104. NAME
  105. time_test
  106. SRCS
  107. "civil_time_test.cc"
  108. "clock_test.cc"
  109. "duration_test.cc"
  110. "format_test.cc"
  111. "time_test.cc"
  112. "time_zone_test.cc"
  113. COPTS
  114. ${ABSL_TEST_COPTS}
  115. DEPS
  116. absl::time_internal_test_util
  117. absl::time
  118. absl::config
  119. absl::core_headers
  120. absl::time_zone
  121. GTest::gmock_main
  122. )