From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/yap/cmake/dependencies.cmake | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/boost/libs/yap/cmake/dependencies.cmake (limited to 'src/boost/libs/yap/cmake/dependencies.cmake') diff --git a/src/boost/libs/yap/cmake/dependencies.cmake b/src/boost/libs/yap/cmake/dependencies.cmake new file mode 100644 index 00000000..b246e887 --- /dev/null +++ b/src/boost/libs/yap/cmake/dependencies.cmake @@ -0,0 +1,68 @@ +# Copyright Louis Dionne 2016 +# Copyright Zach Laine 2016 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) + +############################################################################### +# Boost +############################################################################### +find_package(Boost COMPONENTS) +if (Boost_INCLUDE_DIRS) + add_library(boost INTERFACE) + target_include_directories(boost INTERFACE ${Boost_INCLUDE_DIRS}) +else () + message("-- Boost was not found; attempting to download it if we haven't already...") + include(ExternalProject) + ExternalProject_Add(install-Boost + PREFIX ${CMAKE_BINARY_DIR}/dependencies/boost_1_68_0 + URL https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2 + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + LOG_DOWNLOAD ON + ) + + ExternalProject_Get_Property(install-Boost SOURCE_DIR) + add_library(boost INTERFACE) + target_include_directories(boost INTERFACE ${SOURCE_DIR}) + add_dependencies(boost install-Boost) + unset(SOURCE_DIR) +endif () + + +############################################################################### +# Google Benchmark +############################################################################### +execute_process( + COMMAND git clone https://github.com/google/benchmark.git + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) +execute_process( + COMMAND git checkout v1.2.0 + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/benchmark +) + +option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." OFF) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/benchmark) + + +############################################################################### +# Autodiff (see https://github.com/fqiang/autodiff_library) +############################################################################### +add_library(autodiff_library + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/ActNode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/BinaryOPNode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/Edge.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/EdgeSet.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/Node.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/OPNode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/PNode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/Stack.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/Tape.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/UaryOPNode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/VNode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library/autodiff.cpp +) +target_include_directories(autodiff_library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/example/autodiff_library) +target_compile_definitions(autodiff_library PUBLIC BOOST_ALL_NO_LIB=1) +target_link_libraries(autodiff_library boost) -- cgit v1.2.3