deps_shared_iface.cpp 750 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "testSharedLibDepends.h"
  2. #ifdef CHECK_PIC_WORKS
  3. #if defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
  4. #error Expected by INTERFACE_POSITION_INDEPENDENT_CODE property of dependency
  5. #endif
  6. #endif
  7. #ifndef PIC_PROPERTY_IS_ON
  8. #error Expected PIC_PROPERTY_IS_ON
  9. #endif
  10. #ifndef CUSTOM_PROPERTY_IS_ON
  11. #error Expected CUSTOM_PROPERTY_IS_ON
  12. #endif
  13. #ifndef CUSTOM_STRING_IS_MATCH
  14. #error Expected CUSTOM_STRING_IS_MATCH
  15. #endif
  16. #ifdef TEST_SUBDIR_LIB
  17. #include "subdir.h"
  18. #endif
  19. int main(int,char **)
  20. {
  21. TestSharedLibDepends dep;
  22. TestSharedLibRequired req;
  23. #ifdef TEST_SUBDIR_LIB
  24. SubDirObject sdo;
  25. #endif
  26. return dep.foo() + req.foo()
  27. #ifdef TEST_SUBDIR_LIB
  28. + sdo.foo()
  29. #endif
  30. ;
  31. }