-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [pagmo2] Add new port * Disable C4701 * Disable /MD override for all static builds * Add pagmo2 port_version info * Find TBB when finding pagmo * Fixup pagmo2 port version * Change /Md patch to if(0) * Fix port_version for pagmo2 * Use vcpkg.json; use version * Reformat vcpkg.json * Fix port_versions for pagmo2
- Loading branch information
Showing
7 changed files
with
115 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
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,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "ea29ee58051fba73e950597ca2b0109dd6df0dec", | ||
"version": "2.16.1", | ||
"port-version": 0 | ||
} | ||
] | ||
} |
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,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 96653ba..1afaafa 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -80,7 +80,7 @@ endif() | ||
if(YACMA_COMPILER_IS_MSVC) | ||
# Disable the idiotic minmax macros on MSVC, some annoying warnings, | ||
# enable the bigobj option and the WIN32_LEAN_AND_MEAN definition. | ||
- list(APPEND PAGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/wd4251" "/bigobj" "-DWIN32_LEAN_AND_MEAN") | ||
+ list(APPEND PAGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/wd4251" "/wd4701" "/bigobj" "-DWIN32_LEAN_AND_MEAN") | ||
list(APPEND PAGMO_CXX_FLAGS_RELEASE "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/wd4251" "/bigobj" "-DWIN32_LEAN_AND_MEAN") | ||
# Enable strict conformance mode, if supported. | ||
set(CMAKE_REQUIRED_QUIET TRUE) |
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,20 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 96653ba..549d9d4 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -141,6 +141,7 @@ endif() | ||
# Boost setup. | ||
include(PagmoFindBoost) | ||
|
||
+if(0) | ||
# Explanation: on MSVC, when building static libraries, it is good practice to link | ||
# to the static runtime. CMake, however, is hard-coded to link to the dynamic runtime. | ||
# Hence we hackishly replace the /MD flag with /MT. This is the approach suggested | ||
@@ -161,6 +162,7 @@ if(YACMA_COMPILER_IS_MSVC AND PAGMO_BUILD_STATIC_LIBRARY) | ||
endif() | ||
endforeach() | ||
endif() | ||
+endif() | ||
|
||
# List of source files. | ||
set(PAGMO_SRC_FILES |
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,12 @@ | ||
diff --git a/pagmo-config.cmake.in b/pagmo-config.cmake.in | ||
index 9553fc8..cb5e90b 100644 | ||
--- a/pagmo-config.cmake.in | ||
+++ b/pagmo-config.cmake.in | ||
@@ -8,6 +8,7 @@ set(THREADS_PREFER_PTHREAD_FLAG YES) | ||
find_package(Threads REQUIRED) | ||
unset(THREADS_PREFER_PTHREAD_FLAG) | ||
include(PagmoFindBoost) | ||
+find_package(TBB REQUIRED) | ||
@_PAGMO_CONFIG_OPTIONAL_DEPS@ | ||
# Restore original module path. | ||
set(CMAKE_MODULE_PATH "${_PAGMO_CONFIG_OLD_MODULE_PATH}") |
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,36 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO esa/pagmo2 | ||
REF v2.16.1 | ||
SHA512 dac85a8525316e827df809d187d40f14dc20db7119796b7384d7855f83ba37e0bb595f6d8199053aac857460816929dd599c9d43802f2ed920a6f42dd2f16a03 | ||
HEAD_REF master | ||
PATCHES | ||
"disable-C4701.patch" | ||
"disable-md-override.patch" | ||
"find-tbb.patch" | ||
) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
nlopt PAGMO_WITH_NLOPT | ||
) | ||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAGMO_BUILD_STATIC_LIBRARY) | ||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
-DPAGMO_WITH_EIGEN3=ON | ||
-DPAGMO_BUILD_STATIC_LIBRARY=${PAGMO_BUILD_STATIC_LIBRARY} | ||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
vcpkg_copy_pdbs() | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pagmo) | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
|
||
file(INSTALL ${SOURCE_PATH}/COPYING.lgpl3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) | ||
|
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,21 @@ | ||
{ | ||
"name": "pagmo2", | ||
"version": "2.16.1", | ||
"description": "A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.", | ||
"homepage": "https://esa.github.io/pagmo2/", | ||
"dependencies": [ | ||
"boost-any", | ||
"boost-graph", | ||
"boost-serialization", | ||
"eigen3", | ||
"tbb" | ||
], | ||
"features": { | ||
"nlopt": { | ||
"description": "Enable the NLopt wrappers", | ||
"dependencies": [ | ||
"nlopt" | ||
] | ||
} | ||
} | ||
} |