-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[mp-units] add new port #13416
Merged
Merged
[mp-units] add new port #13416
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 @@ | ||
Source: mp-units | ||
Version: 0.6.0 | ||
Homepage: https://github.com/mpusz/units | ||
Description: mp-units - A Units Library for C++ | ||
Build-Depends: fmt, ms-gsl |
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,35 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index b18a30a96..d89248aa1 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -40,14 +40,24 @@ conan_init(cmake) | ||
add_subdirectory(src) | ||
|
||
# set restrictive compilation warnings | ||
-set_warnings(mp-units) | ||
+# set_warnings(mp-units) | ||
|
||
# add unit tests | ||
-enable_testing() | ||
-add_subdirectory(test) | ||
+option(BUILD_TESTING "Build tests" OFF) | ||
+if(BUILD_TESTING) | ||
+ set_warnings(mp-units) | ||
+ enable_testing() | ||
+ add_subdirectory(test) | ||
+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() |
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 @@ | ||
diff --git a/cmake/common/simple-config.cmake.in b/cmake/common/simple-config.cmake.in | ||
index f40ebfa88..d521e0ba8 100644 | ||
--- a/cmake/common/simple-config.cmake.in | ||
+++ b/cmake/common/simple-config.cmake.in | ||
@@ -1 +1,4 @@ | ||
+include(CMakeFindDependencyMacro) | ||
+find_dependency(fmt CONFIG) | ||
+find_dependency(Microsoft.GSL CONFIG) | ||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") |
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,24 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO mpusz/units | ||
REF 33ad51311b835efb7f7767473f971c02a3140073 | ||
SHA512 18c9a4bb1812d7ab59e86d3eef5f62aa760c8f78eac81086bd3b25f7e2d359f2fba71b0298cf91ecb31dbe13846f2e5ce75133b0db534020102b788dd1c1a1da | ||
PATCHES | ||
cmake.patch | ||
config.patch | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) | ||
# Handle copyright/readme/package files | ||
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(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" | ||
"${CURRENT_PACKAGES_DIR}/lib") # Header only | ||
JackBoosY marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not generally install accessory documentation.