summaryrefslogtreecommitdiff
path: root/CMAKE/lapack-GNUtoMS.cmake
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2011-08-15 13:26:00 (GMT)
committerjulie <julielangou@users.noreply.github.com>2011-08-15 13:26:00 (GMT)
commite6e99382cbc69083c53fae5af84986f44e950fb8 (patch)
tree365433381a7c126f7af920d15041d03fe1ae2d1c /CMAKE/lapack-GNUtoMS.cmake
parent830433cc32848e050bf5776a2c2e7f016fb8b732 (diff)
downloadlapack-e6e99382cbc69083c53fae5af84986f44e950fb8.zip
lapack-e6e99382cbc69083c53fae5af84986f44e950fb8.tar.gz
lapack-e6e99382cbc69083c53fae5af84986f44e950fb8.tar.bz2
Add missing files for GNU-built LAPACK DLLs with MS tools
Diffstat (limited to 'CMAKE/lapack-GNUtoMS.cmake')
-rw-r--r--CMAKE/lapack-GNUtoMS.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMAKE/lapack-GNUtoMS.cmake b/CMAKE/lapack-GNUtoMS.cmake
new file mode 100644
index 0000000..490700c
--- /dev/null
+++ b/CMAKE/lapack-GNUtoMS.cmake
@@ -0,0 +1,16 @@
+# Skip conversion for non-GNU tools.
+if(MINGW OR MSYS OR CYGWIN)
+ return()
+endif()
+
+# Replace each imported target's import library.
+foreach(lib blas lapack)
+ # Replace for all imported build configurations.
+ get_property(configs TARGET ${lib} PROPERTY IMPORTED_CONFIGURATIONS)
+ foreach(config ${configs})
+ get_property(implib TARGET ${lib} PROPERTY IMPORTED_IMPLIB_${config})
+ # Switch to the MS-compatible import library.
+ string(REGEX REPLACE "\\.dll\\.a$" ".lib" implib "${implib}")
+ set_property(TARGET ${lib} PROPERTY IMPORTED_IMPLIB_${config} ${implib})
+ endforeach()
+endforeach()