-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (37 loc) · 1.37 KB
/
CMakeLists.txt
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
option(WITH_QUANTLIB "Enable compilation with QuantLib" OFF)
option(WITH_SYCL "Enable compilation with Sycl" OFF)
cmake_minimum_required(VERSION 3.5)
if(POLICY CMP0079)
cmake_policy(SET CMP0079 NEW)
endif()
# Set the project name
project (llm_cpp_benchmark)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Project settings
# Include dependencies
include(FetchContent)
# QUANTLIB
if(WITH_QUANTLIB)
# Find and specify boost
find_package(Boost REQUIRED)
set(FETCHCONTENT_QUIET OFF)
FetchContent_Declare(
QuantLib
GIT_REPOSITORY https://github.com/lballabio/QuantLib.git
GIT_TAG v1.33
)
FetchContent_GetProperties(QuantLib)
if(NOT QuantLib_POPULATED)
FetchContent_Populate(QuantLib)
# Before adding the subdirectory, potentially modify the QuantLib build configuration here
# Example: Set a variable that QuantLib's CMakeLists.txt might check to disable tests
# This requires QuantLib's CMakeLists.txt to support such a variable, which is not guaranteed
set(QL_BUILD_BENCHMARK OFF CACHE BOOL "Disable QuantLib bench" FORCE)
set(QL_BUILD_EXAMPLES OFF CACHE BOOL "Disable QuantLib examples" FORCE)
set(QL_BUILD_TEST_SUITE OFF CACHE BOOL "Disable QuantLib tests" FORCE)
add_subdirectory(${quantlib_SOURCE_DIR} ${quantlib_BINARY_DIR})
endif()
endif()
add_subdirectory(src)
add_subdirectory(tests)