mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
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:
@@ -1,3 +1,5 @@
|
||||
#include "foo.h"
|
||||
|
||||
int foo()
|
||||
{
|
||||
return 1477;
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#ifndef FOO_H
|
||||
#define FOO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int foo();
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user