/
GMatElasticConfig.cmake
67 lines (54 loc) · 1.8 KB
/
GMatElasticConfig.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# GMatElastic cmake module
#
# This module sets the target:
#
# GMatElastic
#
# In addition, it sets the following variables:
#
# GMatElastic_FOUND - true if the library is found
# GMatElastic_VERSION - the library's version
# GMatElastic_INCLUDE_DIRS - directory containing the library's headers
#
# The following support targets are defined to simplify things:
#
# GMatElastic::compiler_warnings - enable compiler warnings
# GMatElastic::assert - enable library assertions
# GMatElastic::debug - enable all assertions (slow)
include(CMakeFindDependencyMacro)
# Define target "GMatElastic"
if(NOT TARGET GMatElastic)
include("${CMAKE_CURRENT_LIST_DIR}/GMatElasticTargets.cmake")
endif()
# Define "GMatElastic_INCLUDE_DIRS"
get_target_property(
GMatElastic_INCLUDE_DIRS
GMatElastic
INTERFACE_INCLUDE_DIRECTORIES)
# Find dependencies
find_dependency(GMatTensor)
find_dependency(xtensor)
# Define support target "GMatElastic::compiler_warnings"
if(NOT TARGET GMatElastic::compiler_warnings)
add_library(GMatElastic::compiler_warnings INTERFACE IMPORTED)
target_link_libraries(GMatElastic::compiler_warnings INTERFACE
GMatTensor::compiler_warnings)
endif()
# Define support target "GMatElastic::assert"
if(NOT TARGET GMatElastic::assert)
add_library(GMatElastic::assert INTERFACE IMPORTED)
set_property(
TARGET GMatElastic::assert
PROPERTY INTERFACE_COMPILE_DEFINITIONS
GMATELASTIC_ENABLE_ASSERT)
endif()
# Define support target "GMatElastic::debug"
if(NOT TARGET GMatElastic::debug)
add_library(GMatElastic::debug INTERFACE IMPORTED)
set_property(
TARGET GMatElastic::debug
PROPERTY INTERFACE_COMPILE_DEFINITIONS
GMATELASTIC_ENABLE_ASSERT
GMATTENSOR_ENABLE_ASSERT
XTENSOR_ENABLE_ASSERT)
endif()