summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/AutoExportDll/say.cxx
diff options
context:
space:
mode:
authorMikhail Paulyshka <me@mixaill.tk>2017-04-25 21:37:37 (GMT)
committerMikhail Paulyshka <me@mixaill.tk>2017-04-26 19:23:33 (GMT)
commitafb21342ead475a12636f29f7cd77cbe38d05ed1 (patch)
tree6642685529fb584cec268858e520540bbd1a267a /Tests/RunCMake/AutoExportDll/say.cxx
parent959ad1d5e8bbd07b4111630c347ca3d69353f48b (diff)
downloadCMake-afb21342ead475a12636f29f7cd77cbe38d05ed1.zip
CMake-afb21342ead475a12636f29f7cd77cbe38d05ed1.tar.gz
CMake-afb21342ead475a12636f29f7cd77cbe38d05ed1.tar.bz2
bindexplib: fix constants symbols export
Diffstat (limited to 'Tests/RunCMake/AutoExportDll/say.cxx')
-rw-r--r--Tests/RunCMake/AutoExportDll/say.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx
index 51060e8..eb9c0ff 100644
--- a/Tests/RunCMake/AutoExportDll/say.cxx
+++ b/Tests/RunCMake/AutoExportDll/say.cxx
@@ -13,6 +13,14 @@ int WINAPI foo();
int bar();
int objlib();
void justnop();
+
+// test const export
+#ifdef _WIN32
+// data symbols must be explicitly imported
+__declspec(dllimport) extern const char testconst[];
+#else
+extern const char testconst[];
+#endif
}
// test c++ functions
@@ -43,6 +51,8 @@ int main()
bar();
objlib();
printf("\n");
+ printf("%s", testconst);
+ printf("\n");
#ifdef HAS_JUSTNOP
justnop();
#endif