auto-differentiation / QuantLib-Risks-Cpp

Fast risks with QuantLib in C++
https://auto-differentiation.github.io
15 stars 11 forks source link

Fix linking user applications against installed QuantLib with XAD support #11

Closed auto-differentiation-dev closed 8 months ago

auto-differentiation-dev commented 11 months ago

When building QuantLib with XAD support using this repository, the examples and tests inside the repository work fine. However, when installing QuantLib with CMake into a prefix and building a third-party application against this installation is currently broken.

The idea is that, after installing XAD-enabled QuantLib into a prefix in CMake's search path, the following should work in CMake:

find_package(QuantLib REQUIRED)
add_executable(my_user_application source1.cpp ...)
target_link_libraries(my_user_application PRIVATE QuantLib::QuantLib)

In order to fix this, the install exports here should be modified to:

auto-differentiation-dev commented 8 months ago

Fixed by #14