-
Notifications
You must be signed in to change notification settings - Fork 3
/
xtensor-signalConfig.cmake.in
47 lines (41 loc) · 1.99 KB
/
xtensor-signalConfig.cmake.in
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
############################################################################
# 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. #
############################################################################
# xtensor-signal cmake module
# This module sets the following variables in your project::
#
# xtensor-signal_FOUND - true if xtensor-python found on the system
# xtensor-signal_INCLUDE_DIRS - the directory containing xtensor-python headers
# xtensor-signal_LIBRARY - empty
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(xtensor @xtensor_REQUIRED_VERSION@)
if(NOT TARGET @PROJECT_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
get_target_property(@PROJECT_NAME@_INCLUDE_DIRS @PROJECT_NAME@ INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(XTENSOR_USE_XSIMD)
find_dependency(xsimd @xsimd_REQUIRED_VERSION@)
target_link_libraries(@PROJECT_NAME@ INTERFACE xsimd)
target_compile_definitions(@PROJECT_NAME@ INTERFACE XTENSOR_USE_XSIMD)
endif()
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER_EQUAL 3.11)
if(NOT TARGET xtensor-signal::optimize)
add_library(xtensor-signal::optimize INTERFACE IMPORTED)
# Microsoft compiler
if(CMAKE_${COMPILER_LANGUAGE}_COMPILER_IS_MSVC)
target_compile_options(xtensor-signal::optimize INTERFACE /EHsc /MP /bigobj)
# gcc, clang, ...
else()
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-march=native arch_native_supported)
if(arch_native_supported)
target_compile_options(xtensor-signal::optimize INTERFACE -march=native)
endif()
endif()
endif()
endif()