Saturday, December 31, 2011

Building code using QuantLib with CMake

Having just installed QuantLib I followed to build and run one of the examples published on the QuantLib site: DiscreteHedging.cpp

I didn't quite knew how much is needed to do that, but I began with the simplest possible CMakeLists.txt:

ADD_EXECUTABLE( DiscreteHedging DiscreteHedging.cpp )
TARGET_LINK_LIBRARIES( DiscreteHedging QuantLib )

after executing 'cmake .' it worked straight away. Amazing.

No comments:

Post a Comment