__init__.py 952 B

12345678910111213141516171819202122232425262728293031
  1. import os.path
  2. from devtools.yamaker.project import CMakeNinjaNixProject
  3. def uriparser_post_install(self):
  4. with self.yamakes["test"] as test:
  5. # switch test framework into gtest
  6. test.module = "GTEST"
  7. test.EXPLICIT_DATA = True
  8. # unbundle uriparser from the library
  9. test.CFLAGS = []
  10. # needed for config.h
  11. test.ADDINCL = [self.arcdir]
  12. # By default library sources are compiled into the test.
  13. # Replacing them with a normal PEERDIR
  14. test.PEERDIR = [self.arcdir]
  15. test.SRCDIR = []
  16. test.SRCS = [os.path.basename(src) for src in test.SRCS if src.startswith("test/")]
  17. self.yamakes["."].PEERDIR.add("contrib/libs/libc_compat")
  18. uriparser = CMakeNinjaNixProject(
  19. owners=["shindo", "g:mds", "g:cpp-contrib"],
  20. arcdir="contrib/restricted/uriparser",
  21. nixattr="uriparser",
  22. put={"testrunner": "test"},
  23. post_install=uriparser_post_install,
  24. )