Files
CMake/Tests/RunCMake/ObjectLibrary/exe.c
Deniz Bahadir dfb6e84082 objlib: Allow other libraries to link to OBJECT libraries.
Note: This only allows `OBJECT` libraries to be on the right-hand side
of `target_link_libraries` but still does not link its object-files to
the target on the left-hand side.

Issue: #14778
2018-03-01 09:24:24 -05:00

15 lines
239 B
C

#if defined(_WIN32) && defined(COMPILE_FOR_SHARED_LIB)
#define IMPORT __declspec(dllimport)
#else
#define IMPORT
#endif
extern IMPORT int b(void);
int main()
{
return b();
}
#ifndef REQUIRED
#error "REQUIRED needs to be defined"
#endif