diff options
author | Brad King <brad.king@kitware.com> | 2011-03-03 23:02:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-03-04 13:37:57 (GMT) |
commit | 077954d4cbd0d2f8b8ae96964bfe5c9747934fe8 (patch) | |
tree | 678c19be3cdce2b6f34013a62dbfe5376779b31a /Tests/LinkStatic/LinkStatic.c | |
parent | 5abfb571843dba949e010f3b2840d8882d0f3d73 (diff) | |
download | CMake-077954d4cbd0d2f8b8ae96964bfe5c9747934fe8.zip CMake-077954d4cbd0d2f8b8ae96964bfe5c9747934fe8.tar.gz CMake-077954d4cbd0d2f8b8ae96964bfe5c9747934fe8.tar.bz2 |
Test static linking with LINK_SEARCH_START_STATIC
Add "LinkStatic" test that links a static executable against "libm.a".
Pass both "/usr/lib/libm.a" and "-lm" to target_link_libraries to
trigger the link type logic for both cases. If CMake incorrectly
switches the link type to shared for "-lm" then the link will fail.
Diffstat (limited to 'Tests/LinkStatic/LinkStatic.c')
-rw-r--r-- | Tests/LinkStatic/LinkStatic.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/LinkStatic/LinkStatic.c b/Tests/LinkStatic/LinkStatic.c new file mode 100644 index 0000000..3600977 --- /dev/null +++ b/Tests/LinkStatic/LinkStatic.c @@ -0,0 +1,5 @@ +#include <math.h> +int main(void) +{ + return (int)sin(0); +} |