vcpkg/ports/rsocket/portfile.cmake

44 lines
1.3 KiB
CMake
Raw Normal View History

# yarpl only support static build in Windows
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
[rsocket] Use C++17. (#21978) Resolves CI failure: ``` C:\PROGRA~2\MICROS~3\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe /TP -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE -DDEBUG -DFMT_LOCALE -DGFLAGS_DLL_DECLARE_FLAG="" -DGFLAGS_DLL_DEFINE_FLAG="" -DGFLAGS_IS_A_DLL=0 -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL="" -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_SCL_SECURE_NO_WARNINGS -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -ID:\buildtrees\rsocket\src\3daa230e14-e3a6381b1c.clean -ID:\buildtrees\rsocket\src\3daa230e14-e3a6381b1c.clean\yarpl\.. -ID:\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /EHs /GF /Zc:referenceBinding /Zc:rvalueCast /Zc:implicitNoexcept /Zc:strictStrings /Zc:threadSafeInit /Zc:throwingNew /permissive- /std:c++17 /wd4191 /wd4291 /wd4309 /wd4310 /wd4366 /wd4587 /wd4592 /wd4628 /wd4723 /wd4724 /wd4868 /wd4996 /wd4068 /wd4091 /wd4146 /wd4800 /wd4018 /wd4365 /wd4388 /wd4389 /wd4100 /wd4459 /wd4505 /wd4701 /wd4702 /wd4061 /wd4127 /wd4200 /wd4201 /wd4296 /wd4316 /wd4324 /wd4355 /wd4371 /wd4435 /wd4514 /wd4548 /wd4571 /wd4574 /wd4582 /wd4583 /wd4619 /wd4623 /wd4625 /wd4626 /wd4643 /wd4647 /wd4668 /wd4706 /wd4710 /wd4711 /wd4714 /wd4820 /wd5026 /wd5027 /wd5031 /wd5045 /we4099 /we4129 /we4566 -std:c++14 /showIncludes /FoCMakeFiles\ReactiveSocket.dir\rsocket\internal\ScheduledSingleSubscription.cpp.obj /FdCMakeFiles\ReactiveSocket.dir\ReactiveSocket.pdb /FS -c D:\buildtrees\rsocket\src\3daa230e14-e3a6381b1c.clean\rsocket\internal\ScheduledSingleSubscription.cpp cl : Command line warning D9025 : overriding '/std:c++17' with '/std:c++14' D:\installed\x64-windows-static\include\folly/portability/Windows.h(42): warning C4005: '_CRT_INTERNAL_NONSTDC_NAMES': macro redefinition C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt.h(401): note: see previous definition of '_CRT_INTERNAL_NONSTDC_NAMES' D:\installed\x64-windows-static\include\range/v3/detail/config.hpp(225): fatal error C1189: #error: range-v3 requires Visual Studio 2019 with the /std:c++17 (or /std:c++latest) and /permissive- options. ninja: build stopped: subcommand failed. ```
2021-12-13 11:31:37 +08:00
REPO rsocket/rsocket-cpp
REF 45ed594ebd6701f40795c31ec922d784ec7fc921
SHA512 51871253524b93a9622fa0f562019605b6034e4089cd955810050b4d43ff020813d632ea1e91bcaca0a8659638908c51df6eb686ba4f6583d4c15c04d5dc35bd
HEAD_REF master
PATCHES
fix-cmake-config.patch
fix-find-dependencies.patch
[rsocket] Use C++17. (#21978) Resolves CI failure: ``` C:\PROGRA~2\MICROS~3\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe /TP -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE -DDEBUG -DFMT_LOCALE -DGFLAGS_DLL_DECLARE_FLAG="" -DGFLAGS_DLL_DEFINE_FLAG="" -DGFLAGS_IS_A_DLL=0 -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL="" -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_SCL_SECURE_NO_WARNINGS -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -ID:\buildtrees\rsocket\src\3daa230e14-e3a6381b1c.clean -ID:\buildtrees\rsocket\src\3daa230e14-e3a6381b1c.clean\yarpl\.. -ID:\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /EHs /GF /Zc:referenceBinding /Zc:rvalueCast /Zc:implicitNoexcept /Zc:strictStrings /Zc:threadSafeInit /Zc:throwingNew /permissive- /std:c++17 /wd4191 /wd4291 /wd4309 /wd4310 /wd4366 /wd4587 /wd4592 /wd4628 /wd4723 /wd4724 /wd4868 /wd4996 /wd4068 /wd4091 /wd4146 /wd4800 /wd4018 /wd4365 /wd4388 /wd4389 /wd4100 /wd4459 /wd4505 /wd4701 /wd4702 /wd4061 /wd4127 /wd4200 /wd4201 /wd4296 /wd4316 /wd4324 /wd4355 /wd4371 /wd4435 /wd4514 /wd4548 /wd4571 /wd4574 /wd4582 /wd4583 /wd4619 /wd4623 /wd4625 /wd4626 /wd4643 /wd4647 /wd4668 /wd4706 /wd4710 /wd4711 /wd4714 /wd4820 /wd5026 /wd5027 /wd5031 /wd5045 /we4099 /we4129 /we4566 -std:c++14 /showIncludes /FoCMakeFiles\ReactiveSocket.dir\rsocket\internal\ScheduledSingleSubscription.cpp.obj /FdCMakeFiles\ReactiveSocket.dir\ReactiveSocket.pdb /FS -c D:\buildtrees\rsocket\src\3daa230e14-e3a6381b1c.clean\rsocket\internal\ScheduledSingleSubscription.cpp cl : Command line warning D9025 : overriding '/std:c++17' with '/std:c++14' D:\installed\x64-windows-static\include\folly/portability/Windows.h(42): warning C4005: '_CRT_INTERNAL_NONSTDC_NAMES': macro redefinition C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt.h(401): note: see previous definition of '_CRT_INTERNAL_NONSTDC_NAMES' D:\installed\x64-windows-static\include\range/v3/detail/config.hpp(225): fatal error C1189: #error: range-v3 requires Visual Studio 2019 with the /std:c++17 (or /std:c++latest) and /permissive- options. ninja: build stopped: subcommand failed. ```
2021-12-13 11:31:37 +08:00
use-cpp-17.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME yarpl CONFIG_PATH lib/cmake/yarpl DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/rsocket)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/include/yarpl/perf"
"${CURRENT_PACKAGES_DIR}/include/yarpl/cmake"
"${CURRENT_PACKAGES_DIR}/include/yarpl/test"
"${CURRENT_PACKAGES_DIR}/include/rsocket/examples"
"${CURRENT_PACKAGES_DIR}/include/rsocket/test"
)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)