-
Notifications
You must be signed in to change notification settings - Fork 308
Expand file tree
/
Copy pathxsimdConfig.cmake.in
More file actions
54 lines (49 loc) · 2.2 KB
/
Copy pathxsimdConfig.cmake.in
File metadata and controls
54 lines (49 loc) · 2.2 KB
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
############################################################################
# Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and #
# Martin Renou #
# Copyright (c) QuantStack #
# #
# Distributed under the terms of the BSD 3-Clause License. #
# #
# The full license is in the file LICENSE, distributed with this software. #
############################################################################
# xsimd cmake module
# This module sets the following variables in your project::
#
# xsimd_FOUND - true if xsimd found on the system
# xsimd_INCLUDE_DIRS - the directory containing xsimd headers
# xsimd_LIBRARY - empty
@PACKAGE_INIT@
if(NOT TARGET @PROJECT_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
get_target_property(
@PROJECT_NAME@_INCLUDE_DIRS
@PROJECT_NAME@ INTERFACE_INCLUDE_DIRECTORIES
)
# xsimd <= 14 behaviour.
# Packagers that configured xsimd for their users with ENABLE_XTL_COMPLEX
# have it automatically enabled.
# Can be removed in xsimd 15. Keeping it with a version check so we do not
# miss the opportunity to remove it in the next major release.
# Compared to legacy version, users can now override the check
# with XSIMD_ENABLE_XTL_COMPLEX.
if(
@ENABLE_XTL_COMPLEX@
AND @XSIMD_VERSION_MAJOR@ LESS_EQUAL 14
AND NOT DEFINED XSIMD_ENABLE_XTL_COMPLEX
)
# The next check will handle adding it to the target
set(XSIMD_ENABLE_XTL_COMPLEX @ENABLE_XTL_COMPLEX@)
endif()
# Final users of xsimd in a package manager control whether or not to
# enable xtl with this variable.
if(XSIMD_ENABLE_XTL_COMPLEX)
include(CMakeFindDependencyMacro)
find_dependency(xtl 0.8.0 REQUIRED)
target_link_libraries(@PROJECT_NAME@ INTERFACE xtl)
target_compile_definitions(
@PROJECT_NAME@
INTERFACE XSIMD_ENABLE_XTL_COMPLEX=1
)
endif()
endif()