File: lib.cmake

package info (click to toggle)
lapack 3.4.1%2Bdfsg-1%2Bdeb70u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 103,172 kB
  • sloc: fortran: 469,422; ansic: 127,041; makefile: 3,817; python: 267; sh: 94
file content (10 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
# Usage: cmake -Dlib=lib.bat -Ddef=out.def -Ddll=out.dll -Dimp=out.dll.a -P lib.cmake
get_filename_component(name ${dll} NAME) # .dll file name
string(REGEX REPLACE "\\.dll\\.a$" ".lib" out "${imp}") # .dll.a -> .lib
execute_process(
  COMMAND ${lib} /def:${def} /name:${name} /out:${out}
  RESULT_VARIABLE res
  )
if(res)
  message(FATAL_ERROR "lib failed: ${res}")
endif()