GoogleTest.podspec 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright 2017 Google
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # A Private podspec for GoogleTest. Suitable only for use inside this source
  15. # tree.
  16. Pod::Spec.new do |s|
  17. s.name = 'GoogleTest'
  18. s.version = '1.8.0'
  19. s.summary = 'Google Test'
  20. s.description = <<-DESC
  21. Google's C++ test framework.
  22. DESC
  23. s.homepage = 'https://github.com/google/googletest/'
  24. s.license = 'BSD'
  25. s.authors = 'Google, Inc.'
  26. s.source = {
  27. :git => 'https://github.com/google/googletest.git',
  28. :tag => 'release-' + s.version.to_s
  29. }
  30. s.ios.deployment_target = '8.0'
  31. s.requires_arc = false
  32. # Exclude include/gtest/internal/custom files from public headers. These
  33. # files cause problems because they have the same basenames as other headers
  34. # (e.g. gtest.h). We don't need them because they're effectively empty:
  35. # they're compile-time hooks for third-party customization that we don't use.
  36. s.public_header_files = [
  37. 'googletest/include/gtest/*.h',
  38. 'googletest/include/gtest/internal/*.h'
  39. ]
  40. s.header_mappings_dir = 'googletest/include'
  41. # Internal headers accessed only by the implementation. These can't be
  42. # mentioned in source_files because header_mappings_dir will complain about
  43. # headers outside its directory.
  44. s.preserve_paths = [
  45. 'googletest/src/*.h',
  46. ]
  47. s.source_files = [
  48. 'googletest/src/*.cc',
  49. 'googletest/include/gtest/*.h',
  50. 'googletest/include/gtest/internal/*.h'
  51. ]
  52. s.exclude_files = [
  53. # A convenience wrapper for a simple command-line build. If included in
  54. # this build, results in duplicate symbols
  55. 'googletest/src/gtest-all.cc',
  56. ]
  57. s.library = 'c++'
  58. # When building this pod there are headers in googletest/src.
  59. s.pod_target_xcconfig = {
  60. 'HEADER_SEARCH_PATHS' =>
  61. '"${PODS_ROOT}/GoogleTest/googletest/include" "${PODS_ROOT}/GoogleTest/googletest"'
  62. }
  63. s.prepare_command = <<-'CMD'
  64. # Remove includes of files in internal/custom
  65. sed -i.bak -e '/include.*internal\/custom/ d' \
  66. googletest/include/gtest/gtest-printers.h \
  67. googletest/include/gtest/internal/gtest-port.h \
  68. googletest/src/gtest-death-test.cc \
  69. googletest/src/gtest.cc
  70. CMD
  71. end