summaryrefslogtreecommitdiffstats
path: root/Tests/FindPackageModeMakefileTest/foo.h
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2018-08-29 17:02:09 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2018-08-29 17:02:09 (GMT)
commit03f22cd188c8c843ae0aceeedc15fb3655b88573 (patch)
treebbb30582a567236aff2fe44dcbd9f92d83ffcede /Tests/FindPackageModeMakefileTest/foo.h
parent6783fac20a060d0078a03775f179a0f020c53267 (diff)
downloadCMake-03f22cd188c8c843ae0aceeedc15fb3655b88573.zip
CMake-03f22cd188c8c843ae0aceeedc15fb3655b88573.tar.gz
CMake-03f22cd188c8c843ae0aceeedc15fb3655b88573.tar.bz2
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.
Diffstat (limited to 'Tests/FindPackageModeMakefileTest/foo.h')
-rw-r--r--Tests/FindPackageModeMakefileTest/foo.h8
1 files changed, 8 insertions, 0 deletions
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