mirror of https://github.com/microsoft/vcpkg.git
[type-safe] New port. (#15468)
* [type-safe] New port. [debug-assert] Added as it is a dependency. * [type-safe] Formatting fix. * [debug-assert] Add homepage to vcpkg.json Co-authored-by: Blaž Kranjc <bkranjc@cosylab.lan>
This commit is contained in:
parent
271f58aa0c
commit
1ef1ed0d82
|
|
@ -0,0 +1,24 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO foonathan/debug_assert
|
||||
REF 0144b6532ec80349780ffac3cf85a92d87eb7b1b
|
||||
SHA512 16cf38406d5f71585b763ff8af59b09c7b8b05372b07714cdc82f6f27292597c0b6d9025f823515744f8235b326b95e1d630af34db4a0e15d4ded79364290630
|
||||
HEAD_REF v1.3.3
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DDEBUG_ASSERT_INSTALL=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/debug_assert TARGET_PATH share/debug_assert)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "debug-assert",
|
||||
"version-string": "1.3.3",
|
||||
"description": "Provides flexible DEBUG_ASSERT() macro.",
|
||||
"homepage": "https://github.com/foonathan/debug_assert"
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff -ur a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -136,7 +136,7 @@
|
||||
# other subdirectories
|
||||
# only add if not inside add_subdirectory()
|
||||
option(TYPE_SAFE_BUILD_TEST_EXAMPLE "build test and example" OFF)
|
||||
-if(${TYPE_SAFE_BUILD_TEST_EXAMPLE} OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
+if(${TYPE_SAFE_BUILD_TEST_EXAMPLE})
|
||||
enable_testing()
|
||||
add_subdirectory(example/)
|
||||
add_subdirectory(test/)
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO foonathan/type_safe
|
||||
REF da1d15abc612afbdc81d70c817b49ba1752177de
|
||||
SHA512 5b344af89378e34f05d96bff2de61615bc16e21601d9fe9d0886c71db211bd3b42afb2467dd2eb7f3d11176dc9adc2d71c6dc0b60722e12aaf8c1d79ea869289
|
||||
HEAD_REF v0.2.1
|
||||
PATCHES
|
||||
disable_tests.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DTYPE_SAFE_BUILD_TEST_EXAMPLE=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/type_safe TARGET_PATH share/type_safe)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "type-safe",
|
||||
"version-string": "0.2.1",
|
||||
"description": "Zero overhead abstractions that use the C++ type system to prevent bugs.",
|
||||
"homepage": "https://github.com/foonathan/type_safe",
|
||||
"dependencies": [
|
||||
"debug-assert"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue