-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dependencies.cmake
44 lines (40 loc) · 1.52 KB
/
Dependencies.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright (c) 2014-2015 Kartik Kumar, Dinamica Srl
# Copyright (c) 2014-2015 Marko Jankovic, DFKI GmbH
# Copyright (c) 2014-2015 Natalia Ortiz, University of Southampton
# Copyright (c) 2014-2015 Juan Romero, University of Strathclyde
# Distributed under the MIT License.
# See accompanying file LICENSE.md or copy at http://opensource.org/licenses/MIT
# Include script to build external library with CMake.
include(ExternalProject)
if(BUILD_TESTS)
if(NOT BUILD_DEPENDENCIES)
find_package(CATCH)
endif(NOT BUILD_DEPENDENCIES)
if(NOT CATCH_FOUND)
message(STATUS "Catch will be downloaded when ${CMAKE_PROJECT_NAME} is built")
ExternalProject_Add(catch
PREFIX ${EXTERNAL_PATH}/Catch
#--Download step--------------
URL https://github.com/kartikkumar/Catch/archive/master.zip
TIMEOUT 30
#--Update/Patch step----------
UPDATE_COMMAND ""
PATCH_COMMAND ""
#--Configure step-------------
CONFIGURE_COMMAND ""
#--Build step-----------------
BUILD_COMMAND ""
#--Install step---------------
INSTALL_COMMAND ""
#--Output logging-------------
LOG_DOWNLOAD ON
)
ExternalProject_Get_Property(catch source_dir)
set(CATCH_INCLUDE_DIRS ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch")
endif(NOT CATCH_FOUND)
if(NOT APPLE)
include_directories(SYSTEM AFTER "${CATCH_INCLUDE_DIRS}")
else(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${CATCH_INCLUDE_DIRS}\"")
endif(NOT APPLE)
endif(BUILD_TESTS)