Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
add re2 + test (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
headupinclouds authored and ruslo committed Nov 10, 2017
1 parent f9fb88d commit dd92722
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ hunter_config(pugixml VERSION 1.8.1)
hunter_config(pybind11 VERSION 2.2.1)
hunter_config(rabbitmq-c VERSION 0.7.0-p1)
hunter_config(randrproto VERSION 1.3.2)
hunter_config(re2 VERSION 2017.11.01-p0)
hunter_config(renderproto VERSION 0.11.1)
hunter_config(sm VERSION 1.2.1)
hunter_config(Snappy VERSION 1.1.6-p0)
Expand Down
26 changes: 26 additions & 0 deletions cmake/projects/re2/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2016-2017, Ruslan Baratov
# Copyright (c) 2017, David Hirvonen
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
re2
VERSION
2017.11.01-p0
URL
https://github.com/hunter-packages/re2/archive/2017.11.01-p0.tar.gz
SHA1
78ed8b27fe1499a30281f3763bb282ea47636b1a
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(re2)
hunter_download(PACKAGE_NAME re2)
17 changes: 17 additions & 0 deletions examples/re2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2016-2017, Ruslan Baratov
# Copyright (c) 2017, David Hirvonen
# All rights reserved.

cmake_minimum_required(VERSION 3.0)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-re2)

hunter_add_package(re2)
find_package(RE2 CONFIG REQUIRED)

add_executable(foo foo.cpp)
target_link_libraries(foo RE2::re2)
4 changes: 4 additions & 0 deletions examples/re2/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include <re2/re2.h>

int main() {
}

0 comments on commit dd92722

Please sign in to comment.