aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-12 10:18:29 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-12 10:18:29 -0700
commitae0b277ae3162a99852df9c8ac016394cb506257 (patch)
treee42dd2049b920a867f2ce9adff3ff27e14496a09
parent52352d25e6164cc2cab6d1a03e44eb22ef2e8b98 (diff)
downloadvcpkg-ae0b277ae3162a99852df9c8ac016394cb506257.tar.gz
vcpkg-ae0b277ae3162a99852df9c8ac016394cb506257.zip
[celero] Update to use vcpkg_from_github and Ninja
-rw-r--r--ports/celero/CONTROL2
-rw-r--r--ports/celero/portfile.cmake45
2 files changed, 19 insertions, 28 deletions
diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL
index 852e9b4f9..d40c93783 100644
--- a/ports/celero/CONTROL
+++ b/ports/celero/CONTROL
@@ -1,3 +1,3 @@
Source: celero
-Version: 2.1.0
+Version: 2.1.0-1
Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.
diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake
index ef66131e7..c942ca5d8 100644
--- a/ports/celero/portfile.cmake
+++ b/ports/celero/portfile.cmake
@@ -1,35 +1,26 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Celero-master)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/DigitalInBlue/Celero/archive/master.zip"
- FILENAME "celero-v2.1.0.zip"
- SHA512 d3971b102bd1785cf21712bcf2e39193e47d5faaa39421cb1cc788340bb67aed4c32343d3b45042813fcf503d48068bc2a2d26808e2e12d8515e29c60ef40c5c
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-# Disable building of the examples
-set(CELERO_ENABLE_EXPERIMENTS OFF)
-set(CELERO_ENABLE_TESTS OFF)
-set(CELERO_RUN_EXAMPLE_ON_BUILD OFF)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ message(STATUS "Celero currently can only be built statically")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO DigitalInBlue/Celero
+ REF v2.1.0
+ SHA512 30563567255b09a2c810d97896839589ed99d45b6c8d075fd16d1a0068457d70195a199f5c982c84784c2e03284c1eaac565253fa72b81d9e2d4102721b80221
+ HEAD_REF master
+)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- # PREFER_NINJA Disable this option if project cannot be built with Ninja
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DCELERO_ENABLE_EXPERIMENTS=OFF
+ -DCELERO_ENABLE_TESTS=OFF
+ -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF
)
vcpkg_install_cmake()