1 Star 0 Fork 0

liuwen/xtensor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xtensorConfig.cmake.in 2.72 KB
一键复制 编辑 原始数据 按行查看 历史
############################################################################
# Copyright (c) Johan Mabille, Sylvain Corlay and Wolf Vollprecht #
# 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 cmake module
# This module sets the following variables in your project::
#
# xtensor_FOUND - true if xtensor found on the system
# xtensor_INCLUDE_DIRS - the directory containing xtensor headers
# xtensor_LIBRARY - empty
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(xtl @xtl_REQUIRED_VERSION@)
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)
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(XTENSOR_USE_TBB)
find_dependency(TBB)
target_link_libraries(@PROJECT_NAME@ INTERFACE TBB::tbb)
target_compile_definitions(@PROJECT_NAME@ INTERFACE XTENSOR_USE_TBB)
endif()
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER_EQUAL 3.11)
if(NOT TARGET xtensor::optimize)
add_library(xtensor::optimize INTERFACE IMPORTED)
# Microsoft compiler
if(CMAKE_${COMPILER_LANGUAGE}_COMPILER_IS_MSVC)
target_compile_options(xtensor::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::optimize INTERFACE -march=native)
endif()
endif()
endif()
if(NOT TARGET xtensor::use_xsimd)
find_package(xsimd QUIET)
if (xsimd_FOUND)
add_library(xtensor::use_xsimd INTERFACE IMPORTED)
target_link_libraries(xtensor::use_xsimd INTERFACE xsimd)
target_compile_definitions(xtensor::use_xsimd INTERFACE XTENSOR_USE_XSIMD)
endif()
endif()
if(NOT TARGET xtensor::use_TBB)
find_package(TBB QUIET)
if (TBB_FOUND)
add_library(xtensor::use_TBB INTERFACE IMPORTED)
target_compile_definitions(xtensor::use_TBB INTERFACE XTENSOR_USE_TBB)
endif()
endif()
endif()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liuwen01/xtensor.git
git@gitee.com:liuwen01/xtensor.git
liuwen01
xtensor
xtensor
master

搜索帮助