forked from cpp-pm/hunter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2016, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
if(DEFINED HUNTER_CMAKE_PROJECTS_BOOSTCOMPUTE_CMAKE_) | ||
return() | ||
else() | ||
set(HUNTER_CMAKE_PROJECTS_BOOSTCOMPUTE_CMAKE_ 1) | ||
endif() | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
BoostCompute | ||
VERSION | ||
0.5-p0 | ||
URL | ||
"https://github.com/hunter-packages/boost-compute/archive/v0.5-p0.tar.gz" | ||
SHA1 | ||
f9a54b5210a4a8f1beb8c7bd3e2469a76f975de5 | ||
) | ||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(BoostCompute) | ||
hunter_download(PACKAGE_NAME BoostCompute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2016, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.0) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/hunter-packages/gate | ||
include("../common.cmake") | ||
|
||
project(download-boost-compute) | ||
|
||
# download boost.compute | ||
hunter_add_package(BoostCompute) | ||
|
||
# now boost.compute can be used | ||
find_package(BoostCompute CONFIG REQUIRED) | ||
|
||
add_executable(foo foo.cpp) | ||
target_link_libraries(foo BoostCompute::boost_compute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <iostream> // std::cout | ||
#include <boost/compute/core.hpp> | ||
|
||
int main() { | ||
namespace compute = boost::compute; | ||
|
||
// get the default device | ||
compute::device device = compute::system::default_device(); | ||
|
||
// print the device's name | ||
std::cout << "hello from " << device.name() << std::endl; | ||
|
||
return EXIT_SUCCESS; | ||
} |