Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,4 @@ Examples/**/pricingstats.csv
*.fls

.gitmodules

CMakeUserPresets.json
5 changes: 0 additions & 5 deletions App/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ get_library_name("OREData" ORED_LIB_NAME)
get_library_name("QuantExt" QLE_LIB_NAME)
set_ql_library_name()

find_package (Boost REQUIRED COMPONENTS date_time serialization filesystem timer OPTIONAL_COMPONENTS chrono)

include_directories(${Boost_INCLUDE_DIRS})
include_directories(${QUANTLIB_SOURCE_DIR})
include_directories(${QUANTEXT_SOURCE_DIR})
include_directories(${OREDATA_SOURCE_DIR})
Expand All @@ -21,15 +18,13 @@ add_link_directory_if_exists("${QUANTLIB_SOURCE_DIR}/build/ql")
add_link_directory_if_exists("${QUANTEXT_SOURCE_DIR}/build/qle")
add_link_directory_if_exists("${OREDATA_SOURCE_DIR}/build/ored")
add_link_directory_if_exists("${OREANALYTICS_SOURCE_DIR}/build/orea")

add_link_directory_if_exists("${CMAKE_BINARY_DIR}/QuantLib/ql")

add_executable(ore ore.cpp)
target_link_libraries(ore ${OREA_LIB_NAME})
target_link_libraries(ore ${ORED_LIB_NAME})
target_link_libraries(ore ${QLE_LIB_NAME})
target_link_libraries(ore ${QL_LIB_NAME})
target_link_libraries(ore ${Boost_LIBRARIES})
if (ORE_PYTHON_INTEGRATION)
target_link_libraries(ore ${Python_LIBRARIES})
endif()
Expand Down
2 changes: 1 addition & 1 deletion App/ore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include <iostream>

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#include <orea/auto_link.hpp>
#include <ored/auto_link.hpp>
#include <ql/auto_link.hpp>
Expand Down
25 changes: 3 additions & 22 deletions ORE-SWIG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ cmake_policy(SET CMP0086 NEW)
project(ORE-SWIG)

set(CMAKE_SWIG_FLAGS "-fastdispatch")
option(ORE_USE_ZLIB "Use compression for boost::iostreams" OFF)

include(${PROJECT_SOURCE_DIR}/../cmake/commonSettings.cmake)

Expand All @@ -31,22 +30,8 @@ get_library_name("OREData" ORED_LIB_NAME)
get_library_name("QuantExt" QLE_LIB_NAME)
set_ql_library_name()

# To build the module, we moreover need Boost, Swig, Python
set(BOOST_COMPONENT_LIST serialization date_time filesystem timer thread log)


if(ORE_USE_ZLIB)
list(APPEND BOOST_COMPONENT_LIST iostreams)
if(MSVC)
list(APPEND BOOST_COMPONENT_LIST zlib)
endif()
endif()
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENT_LIST} OPTIONAL_COMPONENTS system)
find_package(SWIG REQUIRED)
find_package(Python REQUIRED COMPONENTS Development)
if(ORE_USE_ZLIB)
find_package(ZLIB REQUIRED)
endif()

# Load the UseSWIG module from the cmake installation
include(${SWIG_USE_FILE})
Expand All @@ -56,15 +41,10 @@ include_directories(${PROJECT_SOURCE_DIR}/OREAnalytics-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/QuantLib-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/QuantExt-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/OREData-SWIG/SWIG)

#include_directories(${ORE_BUILD}/QuantLib)

include_directories(${QUANTLIB_SOURCE_DIR})
include_directories(${QUANTEXT_SOURCE_DIR})
include_directories(${OREDATA_SOURCE_DIR})
include_directories(${OREANALYTICS_SOURCE_DIR})

include_directories(${Boost_INCLUDE_DIRS})
include_directories(${Python_INCLUDE_DIRS})

# Add to the list of link directories
Expand All @@ -75,6 +55,7 @@ add_link_directory_if_exists("${OREDATA_SOURCE_DIR}/build/ored")
add_link_directory_if_exists("${OREANALYTICS_SOURCE_DIR}/build/orea")

add_link_directory_if_exists("${CMAKE_BINARY_DIR}/QuantLib")
add_link_directory_if_exists("${CMAKE_BINARY_DIR}/QuantLib/ql")
add_link_directory_if_exists("${CMAKE_BINARY_DIR}/ore/QuantLib")

if(EXISTS "${CMAKE_BINARY_DIR}/ore/QuantLib/")
Expand Down Expand Up @@ -107,13 +88,13 @@ swig_add_library(OREP TYPE MODULE LANGUAGE python SOURCES ${PROJECT_SOURCE_DIR}/
set(CMAKE_DEBUG_POSTFIX ${TEMP_CMAKE_DEBUG_POSTFIX})

# Add all libraries to link with
target_link_libraries(OREP ${Boost_LIBRARIES})
target_link_libraries(OREP Boost::boost Boost::filesystem Boost::log Boost::serialization Boost::timer)
target_link_libraries(OREP ${QL_LIB_NAME})
target_link_libraries(OREP ${QLE_LIB_NAME})
target_link_libraries(OREP ${ORED_LIB_NAME})
target_link_libraries(OREP ${OREA_LIB_NAME})
if(ORE_USE_ZLIB)
target_link_libraries(OREP ${ZLIB_LIBRARIES})
target_link_libraries(OREP Boost::iostreams ZLIB::ZLIB)
endif()
# On windows, do not tell the build which python libs to use. It automatically
# looks for python release libs, even in debug, and invoking the line below
Expand Down
5 changes: 1 addition & 4 deletions ORE-SWIG/OREAnalytics-SWIG/Java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ include_directories(${PROJECT_SOURCE_DIR}/../../QuantExt-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/../../OREData-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/../../OREAnalytics-SWIG/SWIG)

find_package (Boost REQUIRED COMPONENTS serialization date_time filesystem OPTIONAL_COMPONENTS system)
include_directories(${Boost_INCLUDE_DIRS})

# specify library search path (update this when we build ORE with cmake)
add_link_directory_if_exists(${ORE}/build/QuantLib/ql)
add_link_directory_if_exists(${ORE}/build/QuantExt/qle)
Expand Down Expand Up @@ -84,7 +81,7 @@ swig_link_libraries(${ORE_JAVA_LIB_NAME} ${QL_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${QLE_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${ORED_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${OREA_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${Boost_LIBRARIES})
swig_link_libraries(${ORE_JAVA_LIB_NAME} Boost::boost Boost::filesystem Boost::log Boost::serialization Boost::timer)

#add_dependencies(${ORE_JAVA_LIB_NAME} ${QLE_LIB_NAME})
#add_dependencies(${ORE_JAVA_LIB_NAME} ${ORED_LIB_NAME})
Expand Down
2 changes: 1 addition & 1 deletion ORE-SWIG/OREAnalytics-SWIG/SWIG/orea.i
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include <orea/orea.hpp>

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#include <orea/auto_link.hpp>
#define BOOST_LIB_NAME boost_regex
#include <boost/config/auto_link.hpp>
Expand Down
6 changes: 1 addition & 5 deletions ORE-SWIG/OREData-SWIG/Java/CmakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ include_directories(${PROJECT_SOURCE_DIR}/../../QuantLib-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/../../QuantExt-SWIG/SWIG)
include_directories(${PROJECT_SOURCE_DIR}/../../OREData-SWIG/SWIG)

find_package (Boost REQUIRED COMPONENTS serialization date_time regex filesystem OPTIONAL_COMPONENTS system)

include_directories(${Boost_INCLUDE_DIRS})

# specify library search path (update this when we build ORE with cmake)
link_directories(${ORE}/build/QuantLib/ql)
link_directories(${ORE}/build/QuantExt/qle)
Expand Down Expand Up @@ -80,7 +76,7 @@ swig_add_library(${ORE_JAVA_LIB_NAME} TYPE SHARED LANGUAGE java SOURCES ${PROJEC
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${QL_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${QLE_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${ORED_LIB_NAME})
swig_link_libraries(${ORE_JAVA_LIB_NAME} ${Boost_LIBRARIES})
swig_link_libraries(${ORE_JAVA_LIB_NAME} Boost::boost Boost::filesystem Boost::log Boost::serialization Boost::timer)

#add_dependencies(${ORE_JAVA_LIB_NAME} ${QLE_LIB_NAME})
#add_dependencies(${ORE_JAVA_LIB_NAME} ${ORED_LIB_NAME})
Expand Down
2 changes: 1 addition & 1 deletion ORE-SWIG/QuantExt-SWIG/SWIG/ql_patched.i
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#error using an old version of QuantLib, please update
#endif

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#ifdef QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN
#define BOOST_LIB_NAME boost_thread
#include <boost/config/auto_link.hpp>
Expand Down
24 changes: 1 addition & 23 deletions OREAnalytics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,6 @@ get_library_name("OREData" ORED_LIB_NAME)
get_library_name("QuantExt" QLE_LIB_NAME)
set_ql_library_name()

if(MSVC)
add_compile_definitions(BOOST_IOSTREAMS_NO_LIB)
endif()

if(ORE_USE_ZLIB)
find_package(ZLIB REQUIRED)
endif()

SET(COMPONENT_LIST date_time filesystem iostreams serialization timer thread)

if (ORE_BUILD_TESTS)
LIST(APPEND COMPONENT_LIST unit_test_framework)
endif()
if(MSVC AND ORE_USE_ZLIB)
LIST(APPEND COMPONENT_LIST zlib)
endif()
find_package (Boost REQUIRED COMPONENTS ${COMPONENT_LIST} OPTIONAL_COMPONENTS system chrono)
if (ORE_ENABLE_PARALLEL_UNIT_TEST_RUNNER AND UNIX AND NOT APPLE)
find_library(RT_LIBRARY rt REQUIRED)
endif()

include_directories(${Boost_INCLUDE_DIRS})
include_directories(${QUANTLIB_SOURCE_DIR})
include_directories(${QUANTEXT_SOURCE_DIR})
include_directories(${OREDATA_SOURCE_DIR})
Expand All @@ -46,7 +24,7 @@ add_link_directory_if_exists("${CMAKE_BINARY_DIR}/QuantExt/qle")
add_link_directory_if_exists("${CMAKE_BINARY_DIR}/OREData/ored")

add_subdirectory("orea")
if (ORE_BUILD_DOC)
if (ORE_BUILD_DOC AND Doxygen_FOUND)
add_subdirectory("doc")
endif()
if (ORE_BUILD_TESTS)
Expand Down
24 changes: 1 addition & 23 deletions OREAnalytics/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@
# first we can indicate the documentation build as an option and set it to ON by default
#option(ORE_BUILD_DOC "Build documentation" ON)

# check if Doxygen is installed
find_package(Doxygen)
if (DOXYGEN_FOUND AND ORE_BUILD_DOC)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/orea.doxy)
set(DOXYGEN_OUT ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)

# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")

# note the option ALL which allows to build the docs together with the application
add_custom_target( doc_orea ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND AND ORE_BUILD_DOC)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND AND ORE_BUILD_DOC)
generate_doxy_docs("orea")
7 changes: 2 additions & 5 deletions OREAnalytics/orea/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,10 @@ version.hpp)

writeAll("orea" "orea.hpp" "auto_link.hpp" "${OREAnalytics_HDR}")
add_library(${OREA_LIB_NAME} ${OREAnalytics_SRC})
target_link_libraries(${OREA_LIB_NAME} ${QL_LIB_NAME})
target_link_libraries(${OREA_LIB_NAME} ${QLE_LIB_NAME})
target_link_libraries(${OREA_LIB_NAME} ${ORED_LIB_NAME})
target_link_libraries(${OREA_LIB_NAME} ${Boost_LIBRARIES})
target_link_libraries(${OREA_LIB_NAME} ${QL_LIB_NAME} ${QLE_LIB_NAME} ${ORED_LIB_NAME})

if(ORE_USE_ZLIB)
target_link_libraries(${OREA_LIB_NAME} ${ZLIB_LIBRARIES})
target_link_libraries(${OREA_LIB_NAME} Boost::iostreams ZLIB::ZLIB)
endif()

if (QL_USE_PCH)
Expand Down
2 changes: 1 addition & 1 deletion OREAnalytics/orea/orea.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated by cmake
// Do not edit

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#include <orea/auto_link.hpp>
#endif

Expand Down
9 changes: 4 additions & 5 deletions OREAnalytics/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ testportfolio.cpp
testsuite.cpp)

add_executable(orea-test-suite ${OREAnalytics-Test_SRC})
target_link_libraries(orea-test-suite ${QL_LIB_NAME})
target_link_libraries(orea-test-suite ${QLE_LIB_NAME})
target_link_libraries(orea-test-suite ${ORED_LIB_NAME})
target_link_libraries(orea-test-suite ${OREA_LIB_NAME})
target_link_libraries(orea-test-suite ${Boost_LIBRARIES} ${RT_LIBRARY})
target_link_libraries(orea-test-suite ${QL_LIB_NAME} ${QLE_LIB_NAME} ${ORED_LIB_NAME} ${OREA_LIB_NAME})
if(DEFINED RT_LIBRARY AND NOT "${RT_LIBRARY}" MATCHES ".*NOTFOUND$")
target_link_libraries(orea-test-suite ${RT_LIBRARY})
endif()

add_test(NAME orea-test-suite WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND orea-test-suite -- --base_data_path=.)

Expand Down
2 changes: 1 addition & 1 deletion OREAnalytics/test/testsuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using boost::unit_test::framework::master_test_suite;
using ore::test::getBaseDataPath;
using ore::test::setupTestLogging;

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#include <orea/auto_link.hpp>
#include <ored/auto_link.hpp>
#include <ql/auto_link.hpp>
Expand Down
12 changes: 1 addition & 11 deletions OREData/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ get_library_name("OREData" ORED_LIB_NAME)
get_library_name("QuantExt" QLE_LIB_NAME)
set_ql_library_name()

if (ORE_BUILD_TESTS)
SET(COMPONENTS_CONDITIONAL "unit_test_framework")
else()
SET(COMPONENTS_CONDITIONAL "")
endif()

find_package (Boost REQUIRED COMPONENTS ${COMPONENTS_CONDITIONAL} date_time thread serialization timer log filesystem OPTIONAL_COMPONENTS system chrono)


include_directories(${Boost_INCLUDE_DIRS})
include_directories(${QUANTLIB_SOURCE_DIR})
include_directories(${QUANTEXT_SOURCE_DIR})
include_directories(${ORETEST_SOURCE_DIR})
Expand All @@ -30,7 +20,7 @@ add_link_directory_if_exists("${CMAKE_BINARY_DIR}/QuantLib/ql")
add_link_directory_if_exists("${CMAKE_BINARY_DIR}/QuantExt/qle")

add_subdirectory("ored")
if (ORE_BUILD_DOC)
if (ORE_BUILD_DOC AND Doxygen_FOUND)
add_subdirectory("doc")
endif()
if (ORE_BUILD_TESTS)
Expand Down
24 changes: 1 addition & 23 deletions OREData/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@
# first we can indicate the documentation build as an option and set it to ON by default
# option(ORE_BUILD_DOC "Build documentation" ON)

# check if Doxygen is installed
find_package(Doxygen)
if (DOXYGEN_FOUND AND ORE_BUILD_DOC)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/ored.doxy)
set(DOXYGEN_OUT ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)

# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")

# note the option ALL which allows to build the docs together with the application
add_custom_target( doc_ored ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND AND ORE_BUILD_DOC)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND AND ORE_BUILD_DOC)
generate_doxy_docs("ored")
5 changes: 1 addition & 4 deletions OREData/ored/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,7 @@ version.hpp)

writeAll("ored" "ored.hpp" "auto_link.hpp" "${OREData_HDR}")
add_library(${ORED_LIB_NAME} ${OREData_SRC})
target_link_libraries(${ORED_LIB_NAME} ${QLE_LIB_NAME})
target_link_libraries(${ORED_LIB_NAME} ${QL_LIB_NAME})
target_link_libraries(${ORED_LIB_NAME} ${Boost_LIBRARIES})

target_link_libraries(${ORED_LIB_NAME} ${QL_LIB_NAME} ${QLE_LIB_NAME} Boost::filesystem Boost::log)

if (QL_USE_PCH)
target_precompile_headers(${ORED_LIB_NAME}
Expand Down
2 changes: 1 addition & 1 deletion OREData/ored/ored.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated by cmake
// Do not edit

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#include <ored/auto_link.hpp>
#endif

Expand Down
1 change: 0 additions & 1 deletion OREData/ored/portfolio/builders/deltagammaengines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ EuropeanSwaptionEngineBuilderDeltaGamma::engineImpl(const string& id, const stri
computeDeltaVega, computeGamma);
default:
QL_FAIL("Swaption volatility type " << svts->volatilityType() << "not covered in EngineFactory");
break;
}
}

Expand Down
7 changes: 3 additions & 4 deletions OREData/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ yieldcurve.cpp
zerocouponswap.cpp)

add_executable(ored-test-suite ${OREData-Test_SRC})
target_link_libraries(ored-test-suite ${ORED_LIB_NAME})
target_link_libraries(ored-test-suite ${QLE_LIB_NAME})
target_link_libraries(ored-test-suite ${QL_LIB_NAME})
target_link_libraries(ored-test-suite ${Boost_LIBRARIES})
target_link_libraries(ored-test-suite ${QL_LIB_NAME} ${QLE_LIB_NAME} ${ORED_LIB_NAME}
Boost::unit_test_framework
)

# under windows our unit test code switches to .. since it assumes the test executable is run from /bin
# we work around that by explicitly specifying the base_data_path to be the current directory
Expand Down
2 changes: 1 addition & 1 deletion OREData/test/testsuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using boost::unit_test::framework::master_test_suite;
using ore::test::getBaseDataPath;
using ore::test::setupTestLogging;

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#include <ored/auto_link.hpp>
#include <ql/auto_link.hpp>
#include <qle/auto_link.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ORETest/oret/basedatapath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using boost::filesystem::exists;
using boost::filesystem::is_directory;
using boost::filesystem::path;

#ifdef BOOST_MSVC
#if !defined(BOOST_ALL_NO_LIB) && defined(BOOST_MSVC)
#define BOOST_LIB_NAME boost_system
#include <boost/config/auto_link.hpp>
#define BOOST_LIB_NAME boost_filesystem
Expand Down
Loading