QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
auto_link.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2006, 2008 Ferdinando Ametrano
5 Copyright (C) 2012 Édouard Tallent
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21#ifndef quantlib_autolink_hpp
22#define quantlib_autolink_hpp
23
24#include <ql/version.hpp>
25#include <boost/config.hpp>
26
27#ifdef _M_X64
28# define QL_LIB_PLATFORM "-x64"
29#else
30# define QL_LIB_PLATFORM
31#endif
32
33/*** libraries to be linked ***/
34
35// select thread opt:
36#ifdef _MT
37# define QL_LIB_THREAD_OPT "-mt"
38#else
39# define QL_LIB_THREAD_OPT
40#endif
41
42// select linkage opt:
43#ifdef _DLL
44# if defined(_DEBUG)
45# define QL_LIB_RT_OPT "-gd"
46# else
47# define QL_LIB_RT_OPT
48# endif
49#else
50# if defined(_DEBUG)
51# define QL_LIB_RT_OPT "-sgd"
52# else
53# define QL_LIB_RT_OPT "-s"
54# endif
55#endif
56
57#define QL_LIB_NAME "QuantLib" QL_LIB_PLATFORM QL_LIB_THREAD_OPT QL_LIB_RT_OPT ".lib"
58
59#pragma comment(lib, QL_LIB_NAME)
60#ifdef BOOST_LIB_DIAGNOSTIC
61# pragma message("Will (need to) link to lib file: " QL_LIB_NAME)
62#endif
63
64#endif
Version number, and version of boost the library is compiled with.