summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-02-24 13:30:26 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-02-24 13:30:26 (GMT)
commit307bdadadc9b6ea57e0df76ec81168ef4b81b636 (patch)
tree0cc5ca7c42f996425f883b5e4dd367bcc239336d /Tests
parenta9841e6e9aae1f2df0e3d94031dc3816c269d4b5 (diff)
parent6c4b2492728cd3fab60bf11feafe3361f02c08c9 (diff)
downloadCMake-307bdadadc9b6ea57e0df76ec81168ef4b81b636.zip
CMake-307bdadadc9b6ea57e0df76ec81168ef4b81b636.tar.gz
CMake-307bdadadc9b6ea57e0df76ec81168ef4b81b636.tar.bz2
Merge topic 'mingw-module-definition'
6c4b249 Fix Fortran test .def file symbol mangling 7616216 Pass .def files directly to MinGW tools (#9997)
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Fortran/CMakeLists.txt13
-rw-r--r--Tests/Fortran/world_gnu.def2
-rw-r--r--Tests/Fortran/world_icl.def (renamed from Tests/Fortran/world.def)0
3 files changed, 14 insertions, 1 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 04563ef..c68d543 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -22,8 +22,19 @@ elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
endif()
endif()
+# Pick a module .def file with the properly mangled symbol name.
+set(world_def "")
+if(WIN32 AND NOT CYGWIN)
+ if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ set(world_def world_gnu.def)
+ elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel" OR
+ "${CMAKE_GENERATOR}" MATCHES "Visual Studio") # Intel plugin
+ set(world_def world_icl.def)
+ endif()
+endif()
+
add_library(hello STATIC hello.f)
-add_library(world ${_SHARED} world.f world.def)
+add_library(world ${_SHARED} world.f ${world_def})
add_executable(testf testf.f)
target_link_libraries(testf hello world)
diff --git a/Tests/Fortran/world_gnu.def b/Tests/Fortran/world_gnu.def
new file mode 100644
index 0000000..1617798
--- /dev/null
+++ b/Tests/Fortran/world_gnu.def
@@ -0,0 +1,2 @@
+EXPORTS
+ world_
diff --git a/Tests/Fortran/world.def b/Tests/Fortran/world_icl.def
index ead7710..ead7710 100644
--- a/Tests/Fortran/world.def
+++ b/Tests/Fortran/world_icl.def