From 03f22cd188c8c843ae0aceeedc15fb3655b88573 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Wed, 29 Aug 2018 13:02:09 -0400 Subject: 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. --- Tests/FindPackageModeMakefileTest/foo.cpp | 2 ++ Tests/FindPackageModeMakefileTest/foo.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/Tests/FindPackageModeMakefileTest/foo.cpp b/Tests/FindPackageModeMakefileTest/foo.cpp index 6aea226..7cb9381 100644 --- a/Tests/FindPackageModeMakefileTest/foo.cpp +++ b/Tests/FindPackageModeMakefileTest/foo.cpp @@ -1,3 +1,5 @@ +#include "foo.h" + int foo() { return 1477; diff --git a/Tests/FindPackageModeMakefileTest/foo.h b/Tests/FindPackageModeMakefileTest/foo.h index 4ec598a..7051eda 100644 --- a/Tests/FindPackageModeMakefileTest/foo.h +++ b/Tests/FindPackageModeMakefileTest/foo.h @@ -1,6 +1,14 @@ #ifndef FOO_H #define FOO_H +#ifdef __cplusplus +extern "C" { +#endif + int foo(); +#ifdef __cplusplus +} // extern "C" +#endif + #endif -- cgit v0.12