[mp-units] Update to 0.7.0 (#21405)

* Update mp-units to 0.7.0

* Update CI baseline

Co-authored-by: chausner <chausner@users.noreply.github.com>
This commit is contained in:
chausner 2021-11-15 23:18:12 +01:00 committed by GitHub
parent 3e9375fc7d
commit 4d52db6bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 41 deletions

View File

@ -2,12 +2,22 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index b18a30a96..d89248aa1 100644 index b18a30a96..d89248aa1 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -40,14 +40,24 @@ conan_init(cmake) @@ -66,11 +66,21 @@ conan_init(cmake)
add_subdirectory(src) add_subdirectory(src)
# add usage example
-add_subdirectory(example)
+option(BUILD_EXAMPLES "Build usage examples" OFF)
+if(BUILD_EXAMPLES)
+ add_subdirectory(example)
+endif()
# set restrictive compilation warnings # generate project documentation
-set_warnings(mp-units) -add_subdirectory(docs)
+# set_warnings(mp-units) +option(BUILD_DOCS "Generate docs" OFF)
+if(BUILD_DOCS)
+ add_subdirectory(docs)
+endif()
# add unit tests # add unit tests
-enable_testing() -enable_testing()
@ -18,18 +28,3 @@ index b18a30a96..d89248aa1 100644
+ enable_testing() + enable_testing()
+ add_subdirectory(test) + add_subdirectory(test)
+endif() +endif()
# add usage example
-add_subdirectory(example)
-
+option(BUILD_EXAMPLES "Build usage examples" OFF)
+if(BUILD_EXAMPLES)
+ add_subdirectory(example)
+endif()
# generate project documentation
-add_subdirectory(docs)
+
+option(BUILD_DOCS "Generate docs" OFF)
+if(BUILD_DOCS)
+ add_subdirectory(docs)
+endif()

View File

@ -1,9 +1,14 @@
diff --git a/cmake/common/simple-config.cmake.in b/cmake/common/simple-config.cmake.in diff --git a/src/mp-unitsConfig.cmake b/src/mp-unitsConfig.cmake
index f40ebfa88..d521e0ba8 100644 --- a/src/mp-unitsConfig.cmake
--- a/cmake/common/simple-config.cmake.in +++ b/src/mp-unitsConfig.cmake
+++ b/cmake/common/simple-config.cmake.in @@ -39,8 +39,8 @@ function(__check_libcxx_in_use variable)
@@ -1 +1,4 @@ endfunction()
+include(CMakeFindDependencyMacro)
include(CMakeFindDependencyMacro)
-find_dependency(fmt)
-find_dependency(gsl-lite)
+find_dependency(fmt CONFIG) +find_dependency(fmt CONFIG)
+find_dependency(Microsoft.GSL CONFIG) +find_dependency(gsl-lite CONFIG)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
# add range-v3 dependency only for clang + libc++
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

View File

@ -1,24 +1,24 @@
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO mpusz/units REPO mpusz/units
REF 33ad51311b835efb7f7767473f971c02a3140073 REF v0.7.0
SHA512 18c9a4bb1812d7ab59e86d3eef5f62aa760c8f78eac81086bd3b25f7e2d359f2fba71b0298cf91ecb31dbe13846f2e5ce75133b0db534020102b788dd1c1a1da SHA512 72175f34f358d0741650ce9c8a7b28fced90cc45ddd3f1662ae1cb9ff7d31403ff742ee07ab4c96bd2d95af714d9111a888cf6acccb91e568e12d1ef663b2f64
PATCHES PATCHES
cmake.patch cmake.patch
config.patch config.patch
) )
vcpkg_configure_cmake( vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
) )
vcpkg_install_cmake() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
# Handle copyright/readme/package files # Handle copyright/readme/package files
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug"
"${CURRENT_PACKAGES_DIR}/lib") # Header only "${CURRENT_PACKAGES_DIR}/lib") # Header only

View File

@ -1,11 +1,18 @@
{ {
"name": "mp-units", "name": "mp-units",
"version-string": "0.6.0", "version-semver": "0.7.0",
"port-version": 1,
"description": "mp-units - A Units Library for C++", "description": "mp-units - A Units Library for C++",
"homepage": "https://github.com/mpusz/units", "homepage": "https://github.com/mpusz/units",
"dependencies": [ "dependencies": [
"fmt", "fmt",
"ms-gsl" "gsl-lite",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
] ]
} }

View File

@ -4465,8 +4465,8 @@
"port-version": 0 "port-version": 0
}, },
"mp-units": { "mp-units": {
"baseline": "0.6.0", "baseline": "0.7.0",
"port-version": 1 "port-version": 0
}, },
"mp3lame": { "mp3lame": {
"baseline": "3.100", "baseline": "3.100",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "ed05b65c897d6508b0b5f88f8a97373cf8fd8715",
"version-semver": "0.7.0",
"port-version": 0
},
{ {
"git-tree": "f39d5365e27cf32f149da1ef78f0ae6cd09e9039", "git-tree": "f39d5365e27cf32f149da1ef78f0ae6cd09e9039",
"version-string": "0.6.0", "version-string": "0.6.0",