deps_shared_iface.cpp 526 B

1234567891011121314151617181920212223242526272829
  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. #ifdef TEST_SUBDIR_LIB
  8. #include "subdir.h"
  9. #endif
  10. int main(int,char **)
  11. {
  12. TestSharedLibDepends dep;
  13. TestSharedLibRequired req;
  14. #ifdef TEST_SUBDIR_LIB
  15. SubDirObject sdo;
  16. #endif
  17. return dep.foo() + req.foo()
  18. #ifdef TEST_SUBDIR_LIB
  19. + sdo.foo()
  20. #endif
  21. ;
  22. }