aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-14 05:38:43 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-14 05:38:43 -0700
commitab48a71c9af25041ab29a0d8e62a3cdf380638a5 (patch)
tree528226835c82448d70453c5dad90810317087719
parent58fd38c8200ce4c96ebe1aae3f85b324456b0ff7 (diff)
downloadvcpkg-ab48a71c9af25041ab29a0d8e62a3cdf380638a5.tar.gz
vcpkg-ab48a71c9af25041ab29a0d8e62a3cdf380638a5.zip
[cctz][abseil] Initial commit of cctz, improvement of abseil to build synch and time.
-rw-r--r--ports/abseil/CMakeLists.txt32
-rw-r--r--ports/abseil/CONTROL3
-rw-r--r--ports/abseil/portfile.cmake5
-rw-r--r--ports/cctz/CMakeLists.txt36
-rw-r--r--ports/cctz/CONTROL3
-rw-r--r--ports/cctz/portfile.cmake24
6 files changed, 91 insertions, 12 deletions
diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt
index 34b69817a..4a96b3fde 100644
--- a/ports/abseil/CMakeLists.txt
+++ b/ports/abseil/CMakeLists.txt
@@ -1,21 +1,29 @@
cmake_minimum_required(VERSION 3.8)
project(abseil CXX)
-add_definitions(-DNOMINMAX)
+add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
-option(INSTALL_HEADERS "Install header files" ON)
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ option(INSTALL_HEADERS "Install header files" ON)
+else()
+ option(INSTALL_HEADERS "Install header files" OFF)
+endif()
function(add_sublibrary LIB)
file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc")
- list(FILTER SOURCES EXCLUDE REGEX "_test")
+ list(FILTER SOURCES EXCLUDE REGEX "_test(_.+)?.cc$|_nonprod.cc$")
file(GLOB HEADERS "absl/${LIB}/*.h")
file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h")
if(SOURCES)
- add_library(${LIB} ${SOURCES})
+ if("STATIC" IN_LIST ARGN)
+ add_library(${LIB} STATIC ${SOURCES})
+ else()
+ add_library(${LIB} ${SOURCES})
+ endif()
set_target_properties(${LIB} PROPERTIES OUTPUT_NAME "absl_${LIB}")
target_include_directories(${LIB} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
else()
@@ -49,14 +57,17 @@ function(target_link_public_libraries A)
endif()
endfunction()
-add_sublibrary(base)
-add_sublibrary(meta)
add_sublibrary(algorithm)
+add_sublibrary(base)
add_sublibrary(container)
-add_sublibrary(memory)
-add_sublibrary(strings)
add_sublibrary(debugging)
+add_sublibrary(memory)
+add_sublibrary(meta)
add_sublibrary(numeric)
+add_sublibrary(strings)
+add_sublibrary(synchronization STATIC)
+# Time must be static because there are global variables intended for export
+add_sublibrary(time STATIC)
add_sublibrary(types)
add_sublibrary(utility)
@@ -68,6 +79,11 @@ target_link_public_libraries(numeric base)
target_link_public_libraries(strings base memory meta numeric)
target_link_public_libraries(types base utility meta algorithm strings)
target_link_public_libraries(utility base meta)
+target_link_public_libraries(time base numeric)
+target_link_public_libraries(synchronization base time)
+
+find_package(unofficial-cctz REQUIRED)
+targeT_link_libraries(time PUBLIC unofficial::cctz)
install(
EXPORT unofficial-abseil-targets
diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL
index fb37a8cae..44684b6b8 100644
--- a/ports/abseil/CONTROL
+++ b/ports/abseil/CONTROL
@@ -1,6 +1,7 @@
Source: abseil
-Version: 2017-09-28
+Version: 2017-10-14
Description: an open-source collection designed to augment the C++ standard library.
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole.
+Build-Depends: cctz
diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake
index 8c9e81aa3..8273f80e3 100644
--- a/ports/abseil/portfile.cmake
+++ b/ports/abseil/portfile.cmake
@@ -10,8 +10,8 @@ message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
- REF cdf20caa491f59c0a35a8d8fbec0d948e4bc7e4c
- SHA512 04889e7804b644821d0bf5d1b13f15a072e748bf0465442c64528e014c71f415544e9146c9518f9fe7bb14a295b18f293c3f7b672f6a51dba9909f3b74667fae
+ REF 1a9ba5e2e5a14413704f0c913fac53359576d3b6
+ SHA512 756e494c30324c937ca655d91afdee9acb923c7ee837a7c685441305bea2d54a75b3b21be7355abe416660984ba51ace9d234d70168fb029c601b7442397e8ff
HEAD_REF master
)
@@ -25,7 +25,6 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
)
vcpkg_install_cmake()
diff --git a/ports/cctz/CMakeLists.txt b/ports/cctz/CMakeLists.txt
new file mode 100644
index 000000000..99322d05e
--- /dev/null
+++ b/ports/cctz/CMakeLists.txt
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 3.8)
+project(cctz CXX)
+
+set(CMAKE_DEBUG_POSTFIX d)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ option(INSTALL_HEADERS "Install header files" ON)
+else()
+ option(INSTALL_HEADERS "Install header files" OFF)
+endif()
+
+file(GLOB SOURCES src/*.cc)
+list(FILTER SOURCES EXCLUDE REGEX "_test.cc$|benchmarks|_tool.cc$")
+
+file(GLOB HEADERS include/cctz/*.h)
+
+add_library(cctz ${SOURCES})
+target_include_directories(cctz PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
+
+if(INSTALL_HEADERS)
+ install(FILES ${HEADERS} DESTINATION "include/cctz")
+endif()
+
+install(TARGETS cctz EXPORT unofficial-cctz-targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(
+ EXPORT unofficial-cctz-targets
+ FILE unofficial-cctz-config.cmake
+ NAMESPACE unofficial::
+ DESTINATION share/unofficial-cctz
+)
diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL
new file mode 100644
index 000000000..fb125fa13
--- /dev/null
+++ b/ports/cctz/CONTROL
@@ -0,0 +1,3 @@
+Source: cctz
+Version: v2.1
+Description: two libraries that cooperate with <chrono> to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner.
diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake
new file mode 100644
index 000000000..11955b365
--- /dev/null
+++ b/ports/cctz/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/cctz
+ REF v2.1
+ SHA512 b6531ce64fdd8581944457cdeff7f9ff9c00958af51ddb262c74e08fcc076466c59c7bef1ce7edccc9512a7f4cb204e04581d287c4a9a684057fe39421c3fbc6
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctz RENAME copyright)