/
FindCatch.cmake
53 lines (49 loc) · 1.69 KB
/
FindCatch.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
45
46
47
48
49
50
51
52
53
#
# Find the Catch.hpp header file
#
# This module defines
# CATCH_INCLUDE_DIR, where to find catch.hpp
# CATCH_FOUND, If false, do not try to use Catch.
#
# License:
# Zipios++ - a small C++ library that provides easy access to .zip files.
# Copyright (C) 2015 Made to Order Software Corporation
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
SET(CATCH_FOUND "NO")
# The PATH_SUFFXES is necessary under Fedora
#
FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
PATHS
${CMAKE_SOURCE_DIR}/contrib
/usr/local/include
/usr/include
PATH_SUFFIXES
catch
)
IF(CATCH_INCLUDE_DIR)
IF(CATCH_FIND_REQUIRED)
MESSAGE(SEND_ERROR "Could not find library Catch.")
ELSE(CATCH_FIND_REQUIRED)
SET(CATCH_FOUND "YES")
ENDIF(CATCH_FIND_REQUIRED)
ELSE(CATCH_INCLUDE_DIR)
IF(CATCH_FIND_REQUIRED)
MESSAGE(SEND_ERROR "Could not find library Catch.")
ENDIF(CATCH_FIND_REQUIRED)
ENDIF(CATCH_INCLUDE_DIR)
# vim: ts=4 sw=4 et