summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-01 14:00:43 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-03-01 14:00:43 (GMT)
commit86563cf7c8e6dd4fa98a35b9153e4108e8a2286f (patch)
treeeb19ec8c30497b89bfc74d38364ebdf19fae5075 /Tests/RunCMake
parent4fc64ce76d9981674ababaa3279952544ba8ac01 (diff)
parent85e08370d0774397f42a7d45d07f22b3a817fe10 (diff)
downloadCMake-86563cf7c8e6dd4fa98a35b9153e4108e8a2286f.zip
CMake-86563cf7c8e6dd4fa98a35b9153e4108e8a2286f.tar.gz
CMake-86563cf7c8e6dd4fa98a35b9153e4108e8a2286f.tar.bz2
Merge topic 'export-executable-symbols'
85e08370 bindexplib: Always export executable symbols, even they are also readable
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/AutoExportDll/AutoExport.cmake6
-rw-r--r--Tests/RunCMake/AutoExportDll/nop.asm12
-rw-r--r--Tests/RunCMake/AutoExportDll/say.cxx4
3 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
index d37e896..a550005 100644
--- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake
+++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
@@ -11,5 +11,11 @@ if(MSVC)
set_target_properties(say PROPERTIES ENABLE_EXPORTS ON)
add_library(autoexport_for_exec SHARED hello2.c)
target_link_libraries(autoexport_for_exec say)
+ if(NOT MSVC_VERSION VERSION_LESS 1600)
+ enable_language(ASM_MASM)
+ target_sources(autoexport PRIVATE nop.asm)
+ set_property(SOURCE nop.asm PROPERTY COMPILE_FLAGS /safeseh)
+ target_compile_definitions(say PRIVATE HAS_JUSTNOP)
+ endif()
endif()
target_link_libraries(say autoexport autoexport2)
diff --git a/Tests/RunCMake/AutoExportDll/nop.asm b/Tests/RunCMake/AutoExportDll/nop.asm
new file mode 100644
index 0000000..fd6892f
--- /dev/null
+++ b/Tests/RunCMake/AutoExportDll/nop.asm
@@ -0,0 +1,12 @@
+IFDEF RAX
+ELSE
+.MODEL FLAT,C
+ENDIF
+
+SOME SEGMENT EXECUTE READ
+
+public justnop
+justnop:
+ ret
+
+END
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx
index e966b1f..51060e8 100644
--- a/Tests/RunCMake/AutoExportDll/say.cxx
+++ b/Tests/RunCMake/AutoExportDll/say.cxx
@@ -12,6 +12,7 @@ int WINAPI foo();
// test regular C
int bar();
int objlib();
+void justnop();
}
// test c++ functions
@@ -42,5 +43,8 @@ int main()
bar();
objlib();
printf("\n");
+#ifdef HAS_JUSTNOP
+ justnop();
+#endif
return 0;
}