FindPackageModeMakefileTest: Explicitly use C linkage

This explicitly uses C linkage for the library code used by the test to work
around some compilers (Solaris Studio 12.4) that implicitly assume incorrect
linkage information.  Since something else entirely is being tested here,
this allows the test to proceed as needed on the affected platforms.
This commit is contained in:
Chuck Atkins
2018-08-29 13:02:09 -04:00
parent 6783fac20a
commit 03f22cd188
2 changed files with 10 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
#include "foo.h"
int foo()
{
return 1477;

View File

@@ -1,6 +1,14 @@
#ifndef FOO_H
#define FOO_H
#ifdef __cplusplus
extern "C" {
#endif
int foo();
#ifdef __cplusplus
} // extern "C"
#endif
#endif