CMake/Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.c
Brad King 4891f0f966 Ninja: Ensure shared library version symlinks are created for dependents
When linking to a shared library target that has version symlinks, add
an order-only dependency on the build statement that creates the links.
This ensures that the links exist for use at runtime.

Fixes: #19774
2019-10-01 14:34:03 -04:00

18 lines
241 B
C

#ifndef REQUIRED
# error "REQUIRED not defined"
#endif
#if defined(_WIN32)
# define IMPORT __declspec(dllimport)
#else
# define IMPORT
#endif
IMPORT int a(void);
extern int required(void);
int main(void)
{
return required() + a();
}