forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b966acc
commit 4bf2b19
Showing
7 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Source: metis | ||
Version: 5.1.0 | ||
Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- a/CMakeLists.txt Wed Dec 21 18:24:22 2016 | ||
+++ b/CMakeLists.txt Wed Dec 21 18:24:26 2016 | ||
@@ -20,4 +20,4 @@ | ||
# Recursively look for CMakeLists.txt in subdirs. | ||
add_subdirectory("include") | ||
add_subdirectory("libmetis") | ||
-add_subdirectory("programs") | ||
+# add_subdirectory("programs") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- a/CMakeLists.txt Sat Mar 30 17:24:45 2013 | ||
+++ b/CMakeLists.txt Wed Dec 21 18:23:43 2016 | ||
@@ -4,11 +4,7 @@ | ||
set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib") | ||
set(SHARED FALSE CACHE BOOL "build a shared library") | ||
|
||
-if(MSVC) | ||
- set(METIS_INSTALL FALSE) | ||
-else() | ||
- set(METIS_INSTALL TRUE) | ||
-endif() | ||
+set(METIS_INSTALL TRUE) | ||
|
||
# Configure libmetis library. | ||
if(SHARED) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/GKlib/gk_arch.h Wed Dec 21 18:34:18 2016 | ||
+++ b/GKlib/gk_arch.h Wed Dec 21 18:30:49 2016 | ||
@@ -58,7 +58,7 @@ | ||
#define PTRDIFF_MAX INT64_MAX | ||
#endif | ||
|
||
-#ifdef __MSC__ | ||
+#if defined(__MSC__) && (_MSC_VER < 1900) | ||
/* MSC does not have rint() function */ | ||
#define rint(x) ((int)((x)+0.5)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/libmetis/metislib.h Sat Mar 30 17:24:45 2013 | ||
+++ b/libmetis/metislib.h Wed Dec 21 18:30:59 2016 | ||
@@ -31,7 +31,7 @@ | ||
#include <proto.h> | ||
|
||
|
||
-#if defined(COMPILER_MSC) | ||
+#if defined(COMPILER_MSC) && (_MSC_VER < 1900) | ||
#if defined(rint) | ||
#undef rint | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/libmetis/CMakeLists.txt Sat Mar 30 17:24:45 2013 | ||
+++ b/libmetis/CMakeLists.txt Wed Dec 21 17:41:37 2016 | ||
@@ -11,6 +11,6 @@ | ||
if(METIS_INSTALL) | ||
install(TARGETS metis | ||
LIBRARY DESTINATION lib | ||
- RUNTIME DESTINATION lib | ||
+ RUNTIME DESTINATION bin | ||
ARCHIVE DESTINATION lib) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Common Ambient Variables: | ||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> | ||
# TARGET_TRIPLET is the current triplet (x86-windows, etc) | ||
# PORT is the current port name (zlib, etc) | ||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} | ||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} | ||
# | ||
|
||
include(vcpkg_common_functions) | ||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/metis-5.1.0) | ||
vcpkg_download_distfile(ARCHIVE | ||
URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" | ||
FILENAME "metis-5.1.0.tar.gz" | ||
SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25 | ||
) | ||
vcpkg_extract_source_archive(${ARCHIVE}) | ||
|
||
vcpkg_apply_patches( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PATCHES | ||
${CMAKE_CURRENT_LIST_DIR}/enable-install.patch | ||
${CMAKE_CURRENT_LIST_DIR}/disable-programs.patch | ||
${CMAKE_CURRENT_LIST_DIR}/fix-runtime-install-destination.patch | ||
${CMAKE_CURRENT_LIST_DIR}/fix-metis-vs14-math.patch | ||
${CMAKE_CURRENT_LIST_DIR}/fix-gklib-vs14-math.patch | ||
) | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) | ||
set(OPTIONS -DSHARED=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON) | ||
else() | ||
set(OPTIONS -DSHARED=OFF) | ||
endif() | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
OPTIONS | ||
${OPTIONS} | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
|
||
# Handle copyright | ||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/metis) | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/metis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/metis/copyright) |