Showing posts with label cmake. Show all posts
Showing posts with label cmake. Show all posts

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.

Saturday, November 22, 2008

QT3 - BOUML - CMake: Hello World!

I am going to demonstrate how to combine the two tools, BOUML and CMake, to create the simplest possible QT3-based classic "Hello World" application.

First, in BOUML create a project under a name hello_world in a directory hello_world/model. Then select c++ as a working language. In the browser pane right-click to access the Edit  generation settings menu, where in the "Directory" tab we will enter hello_world/gensrc as a c++ root directory, where all the generated source code will be saved.