Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg baseline][many ports] Fix build error #17983

Merged
merged 18 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions ports/embree2/CONTROL

This file was deleted.

14 changes: 14 additions & 0 deletions ports/embree2/cmake_policy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index afa704d..96dc4f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,9 @@ IF(COMMAND cmake_policy)
if (POLICY CMP0042)
cmake_policy(SET CMP0042 OLD)
endif()
+ if (POLICY CMP0001)
+ cmake_policy(SET CMP0001 OLD)
+ endif()
ENDIF(COMMAND cmake_policy)

MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
2 changes: 2 additions & 0 deletions ports/embree2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_github(
REF v2.17.7
SHA512 3ea548e5ed85f68dc1f9dfe864711f9b731e0df8a2258257f77db08bbdbe3a9014a626313e3ff41174f3b26f09dc8ff523900119ff4c8465bfff53f621052873
HEAD_REF devel2
PATCHES
cmake_policy.patch
)

file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake)
Expand Down
10 changes: 10 additions & 0 deletions ports/embree2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "embree2",
"version-semver": "2.17.7",
"port-version": 1,
"description": "High Performance Ray Tracing Kernels.",
"homepage": "https://github.com/embree/embree",
"dependencies": [
"tbb"
]
}
14 changes: 14 additions & 0 deletions ports/embree3/cmake_policy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06f49a8..fdaaee7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,9 @@ IF(COMMAND cmake_policy)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
+ if (POLICY CMP0001)
+ cmake_policy(SET CMP0001 OLD)
+ endif()
ENDIF(COMMAND cmake_policy)

MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
1 change: 1 addition & 0 deletions ports/embree3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
fix-path.patch
fix-static-usage.patch
cmake_policy.patch
)

string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static EMBREE_STATIC_LIB)
Expand Down
3 changes: 2 additions & 1 deletion ports/embree3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "embree3",
"version": "3.12.2",
"version-semver": "3.12.2",
"port-version": 1,
"description": "High Performance Ray Tracing Kernels.",
"homepage": "https://github.com/embree/embree",
"dependencies": [
Expand Down
9 changes: 0 additions & 9 deletions ports/mlpack/CONTROL

This file was deleted.

15 changes: 15 additions & 0 deletions ports/mlpack/fix-configure-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMake/go/AppendModel.cmake b/CMake/go/AppendModel.cmake
index eeb28f7..ec50f15 100644
--- a/CMake/go/AppendModel.cmake
+++ b/CMake/go/AppendModel.cmake
@@ -44,8 +44,8 @@ function(append_model SERIALIZATION_FILE PROGRAM_MAIN_FILE)
else ()
string(APPEND GOMODEL_SAFE_TYPE ${MODEL_CHAR})
endif()
- endif()
- endforeach()
+ endforeach()
+ endif()

# See if the model type already exists.
file(READ "${SERIALIZATION_FILE}" SERIALIZATION_FILE_CONTENTS)
24 changes: 24 additions & 0 deletions ports/mlpack/fix-test-dependency.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b59555c..4dd92f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -441,11 +441,18 @@ set(Boost_ADDITIONAL_VERSIONS
set(Boost_NO_BOOST_CMAKE 1)
find_package(Boost "${BOOST_VERSION}"
COMPONENTS
- unit_test_framework
serialization
REQUIRED
)

+if (BUILD_TESTS)
+ find_package(Boost "${BOOST_VERSION}"
+ COMPONENTS
+ unit_test_framework
+ REQUIRED
+ )
+endif()
+
if(0)
link_directories(${Boost_LIBRARY_DIRS})

19 changes: 19 additions & 0 deletions ports/mlpack/fix-uwp-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/src/mlpack/core/data/is_naninf.hpp b/src/mlpack/core/data/is_naninf.hpp
index 9462cdb..ac06b49 100644
--- a/src/mlpack/core/data/is_naninf.hpp
+++ b/src/mlpack/core/data/is_naninf.hpp
@@ -41,12 +41,12 @@ inline bool IsNaNInf(T& val, const std::string& token)
if (std::numeric_limits<T>::has_infinity)
{
val = (!neg) ? std::numeric_limits<T>::infinity() :
- -std::numeric_limits<T>::infinity();
+ -1 * std::numeric_limits<T>::infinity();
}
else
{
val = (!neg) ? std::numeric_limits<T>::max() :
- -std::numeric_limits<T>::max();
+ -1 * std::numeric_limits<T>::max();
}

return true;
3 changes: 3 additions & 0 deletions ports/mlpack/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
cmakelists.patch
fix-configure-error.patch
fix-test-dependency.patch
fix-uwp-build.patch
)

file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake)
Expand Down
24 changes: 24 additions & 0 deletions ports/mlpack/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "mlpack",
"version": "3.4.1",
"port-version": 1,
"description": "mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms.",
"homepage": "https://github.com/mlpack/mlpack",
"supports": "uwp",
"dependencies": [
"armadillo",
"boost-heap",
"boost-math",
"boost-program-options",
"boost-random",
"boost-serialization",
"boost-serialization",
"ensmallen",
"stb"
],
"features": {
"tools": {
"description": "Build command-line executables."
}
}
}
15 changes: 15 additions & 0 deletions ports/wxwidgets/fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/build/cmake/lib/stc/CMakeLists.txt b/build/cmake/lib/stc/CMakeLists.txt
index bd6acd8..b5b5780 100644
--- a/build/cmake/lib/stc/CMakeLists.txt
+++ b/build/cmake/lib/stc/CMakeLists.txt
@@ -179,7 +179,9 @@ if(wxBUILD_PRECOMP)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(wxSCINTILLA_PREC_HEADER "${wxSOURCE_DIR}/src/stc/scintilla/include/Scintilla.h")
endif()
- wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})
+ if (wxSCINTILLA_PREC_HEADER)
+ wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})
+ endif()
endif()

wx_add_library(wxstc ${STC_FILES})
1 change: 1 addition & 0 deletions ports/wxwidgets/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
disable-platform-lib-dir.patch
fix-build.patch
)

set(OPTIONS)
Expand Down
1 change: 1 addition & 0 deletions ports/wxwidgets/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "wxwidgets",
"version-semver": "3.1.5",
"port-version": 1,
"description": "a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications.",
"homepage": "https://github.com/wxWidgets/wxWidgets",
"supports": "!uwp",
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1830,11 +1830,11 @@
},
"embree2": {
"baseline": "2.17.7",
"port-version": 0
"port-version": 1
},
"embree3": {
"baseline": "3.12.2",
"port-version": 0
"port-version": 1
},
"enet": {
"baseline": "1.3.16",
Expand Down Expand Up @@ -3998,7 +3998,7 @@
},
"mlpack": {
"baseline": "3.4.1",
"port-version": 0
"port-version": 1
},
"mman": {
"baseline": "git-f5ff813-3",
Expand Down Expand Up @@ -6506,7 +6506,7 @@
},
"wxwidgets": {
"baseline": "3.1.5",
"port-version": 0
"port-version": 1
},
"x-plane": {
"baseline": "3.0.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/e-/embree2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "234d3da49438399d5df9e1a105401bc930ae22fe",
"version-semver": "2.17.7",
"port-version": 1
},
{
"git-tree": "3a87d7af065343c7a78620fa2f432272cb56c117",
"version-string": "2.17.7",
Expand Down
5 changes: 5 additions & 0 deletions versions/e-/embree3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d0b90c66c1c8be2574ff610fe1fda718e8b87b78",
"version-semver": "3.12.2",
"port-version": 1
},
{
"git-tree": "8684283b1251cae5f299462307ff5cac0cf1f4fd",
"version": "3.12.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/mlpack.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "97d291587006f8eb1933b8eda726123c8b1ab4d2",
"version": "3.4.1",
"port-version": 1
},
{
"git-tree": "ca98fd8ae45d5ef5e77e4f2942b2dbe60a4356d4",
"version-string": "3.4.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/w-/wxwidgets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9140ae8c095ca8906ebf8150016f520fbdcb27d7",
"version-semver": "3.1.5",
"port-version": 1
},
{
"git-tree": "09e00eb06f1870d88caadf9e5e23719b197deda4",
"version-semver": "3.1.5",
Expand Down