Skip to content

Commit d5ff8f8

Browse files
committed
QPR-13660: conditional boost system
1 parent 7689ea7 commit d5ff8f8

6 files changed

Lines changed: 34 additions & 6 deletions

File tree

ORE-SWIG/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ get_library_name("QuantExt" QLE_LIB_NAME)
3232
set_ql_library_name()
3333

3434
# To build the module, we moreover need Boost, Swig, Python
35-
set(BOOST_COMPONENT_LIST serialization date_time filesystem timer thread log)
35+
if(${Boost_VERSION_MINOR} LESS 89)
36+
set(BOOST_COMPONENT_LIST serialization date_time filesystem system timer thread log)
37+
else()
38+
set(BOOST_COMPONENT_LIST serialization date_time filesystem timer thread log)
39+
endif()
40+
3641
if(ORE_USE_ZLIB)
3742
list(APPEND BOOST_COMPONENT_LIST iostreams)
3843
if(MSVC)

ORE-SWIG/OREAnalytics-SWIG/Java/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ include_directories(${PROJECT_SOURCE_DIR}/../../QuantExt-SWIG/SWIG)
5151
include_directories(${PROJECT_SOURCE_DIR}/../../OREData-SWIG/SWIG)
5252
include_directories(${PROJECT_SOURCE_DIR}/../../OREAnalytics-SWIG/SWIG)
5353

54-
find_package (Boost COMPONENTS serialization date_time filesystem REQUIRED)
54+
if(${Boost_VERSION_MINOR} LESS 89)
55+
find_package (Boost COMPONENTS serialization date_time system filesystem REQUIRED)
56+
else()
57+
find_package (Boost COMPONENTS serialization date_time filesystem REQUIRED)
58+
endif()
5559
include_directories(${Boost_INCLUDE_DIRS})
5660

5761
# specify library search path (update this when we build ORE with cmake)

ORE-SWIG/OREData-SWIG/Java/CmakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ include_directories(${PROJECT_SOURCE_DIR}/../../QuantLib-SWIG/SWIG)
4848
include_directories(${PROJECT_SOURCE_DIR}/../../QuantExt-SWIG/SWIG)
4949
include_directories(${PROJECT_SOURCE_DIR}/../../OREData-SWIG/SWIG)
5050

51-
find_package (Boost COMPONENTS serialization date_time regex filesystem REQUIRED)
51+
if(${Boost_VERSION_MINOR} LESS 89)
52+
find_package (Boost COMPONENTS serialization date_time regex filesystem system REQUIRED)
53+
else()
54+
find_package (Boost COMPONENTS serialization date_time regex filesystem REQUIRED)
55+
endif()
5256
include_directories(${Boost_INCLUDE_DIRS})
5357

5458
# specify library search path (update this when we build ORE with cmake)

OREAnalytics/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ if(ORE_USE_ZLIB)
1717
find_package(ZLIB REQUIRED)
1818
endif()
1919

20-
SET(COMPONENT_LIST date_time filesystem iostreams serialization timer thread)
20+
if(${Boost_VERSION_MINOR} LESS 89)
21+
SET(COMPONENT_LIST date_time filesystem iostreams serialization system timer thread)
22+
else()
23+
SET(COMPONENT_LIST date_time filesystem iostreams serialization timer thread)
24+
endif()
25+
2126
if (ORE_BUILD_TESTS)
2227
LIST(APPEND COMPONENT_LIST unit_test_framework)
2328
endif()

OREData/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ if (ORE_BUILD_TESTS)
1313
else()
1414
SET(COMPONENTS_CONDITIONAL "")
1515
endif()
16-
find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time serialization filesystem timer log OPTIONAL_COMPONENTS chrono)
16+
if(${Boost_VERSION_MINOR} LESS 89)
17+
find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time thread serialization system timer log filesystem OPTIONAL_COMPONENTS chrono)
18+
else()
19+
find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time thread serialization timer log filesystem OPTIONAL_COMPONENTS chrono)
20+
endif()
1721

1822
include_directories(${Boost_INCLUDE_DIRS})
1923
include_directories(${QUANTLIB_SOURCE_DIR})

QuantExt/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ if (ORE_BUILD_TESTS)
1212
else()
1313
SET(COMPONENTS_CONDITIONAL "")
1414
endif()
15-
find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time thread serialization timer log filesystem OPTIONAL_COMPONENTS chrono)
15+
16+
if(${Boost_VERSION_MINOR} LESS 89)
17+
find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time thread serialization system timer log filesystem OPTIONAL_COMPONENTS chrono)
18+
else()
19+
find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time thread serialization timer log filesystem OPTIONAL_COMPONENTS chrono)
20+
endif()
21+
1622
if (ORE_ENABLE_PARALLEL_UNIT_TEST_RUNNER AND UNIX AND NOT APPLE)
1723
find_library(RT_LIBRARY rt REQUIRED)
1824
endif()

0 commit comments

Comments
 (0)