Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PrematureStopping] Add CMake support to search or install RxCpp.
- Loading branch information
Showing
3 changed files
with
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright Gonzalo Brito Gadeschi 2015 | ||
# Copyright Kirk Shoop 2016 | ||
# Distributed under the Boost Software License, Version 1.0. | ||
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
# | ||
# Find the rxcpp include directory | ||
# The following variables are set if rxcpp is found. | ||
# rxcpp_FOUND - True when the rxcpp include directory is found. | ||
# rxcpp_INCLUDE_DIR - The path to where the meta include files are. | ||
# If rxcpp is not found, rxcpp_FOUND is set to false. | ||
|
||
# https://github.com/gnzlbg/ndtree/blob/master/cmake/Findrange-v3.cmake | ||
|
||
find_package(PkgConfig) | ||
|
||
if(NOT EXISTS "${rxcpp_INCLUDE_DIR}") | ||
find_path(rxcpp_INCLUDE_DIR | ||
NAMES rxcpp/rx.hpp | ||
DOC "rxcpp library header files" | ||
) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
mark_as_advanced(rxcpp_INCLUDE_DIR) | ||
|
||
if(EXISTS "${rxcpp_INCLUDE_DIR}") | ||
set(rxcpp_FOUND 1) | ||
else() | ||
set(rxcpp_FOUND 0) | ||
endif() |
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,23 @@ | ||
GetCompilers() | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add( | ||
rxcpp | ||
PREFIX ${CMAKE_BINARY_DIR}/rxcpp | ||
DOWNLOAD_DIR ${THIRD_PARTY_DIR}/rxcpp | ||
URL https://github.com/Reactive-Extensions/RxCpp/archive/v4.0.0.tar.gz | ||
URL_MD5 feb89934f465bb5ac513c9adce8d3b1b | ||
CMAKE_ARGS | ||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo | ||
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_BINARY_DIR}/src/shogun/lib/external | ||
-DCMAKE_C_COMPILER:STRING=${C_COMPILER} | ||
-DCMAKE_CXX_COMPILER:STRING=${CXX_COMPILER} | ||
BUILD_COMMAND "" | ||
) | ||
|
||
add_dependencies(libshogun rxcpp) | ||
|
||
set(rxcpp_INCLUDE_DIR ${THIRD_PARTY_INCLUDE_DIR}) | ||
|
||
UNSET(C_COMPILER) | ||
UNSET(CXX_COMPILER) |
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