CMake/Tests/BuildDepends/Project/link_depends_no_shared_exe.c
Brad King 306796e862 Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED
Build a shared library and an executable linking to it inside the inner
test.  Set LINK_DEPENDS_NO_SHARED on the executable.  Add a custom
target to compare the output file times.  Verify that on the first build
the executable is newer than the library.  Then modify a library source
file.  Verify that on the second build the library is newer because the
executable did not have a dependency to re-link.
2012-11-09 09:26:51 -05:00

10 lines
210 B
C

#include "link_depends_no_shared_exe.h"
#ifdef _WIN32
__declspec(dllimport)
#endif
int link_depends_no_shared_lib(void);
int main()
{
return link_depends_no_shared_lib() + link_depends_no_shared_exe_value;
}