summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/yap/cmake/dependencies.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/yap/cmake/dependencies.cmake
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/yap/cmake/dependencies.cmake')
-rw-r--r--src/boost/libs/yap/cmake/dependencies.cmake68
1 files changed, 68 insertions, 0 deletions
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)