source: trunk/example/CMakeLists.txt @ 3803

Last change on this file since 3803 was 3803, checked in by bradbell, 4 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: d75b0cba62a41b958b974a326168299773bc4614
end hash code: 8dd8b10d36b325a3f4bbf3c03f1ea00e288331ae

commit 8dd8b10d36b325a3f4bbf3c03f1ea00e288331ae
Author: Brad Bell <bradbell@…>
Date: Fri Mar 18 20:25:17 2016 -0700

  1. replace multiple */test_one.sh.in by one bin/test_one.sh.
  2. remove test_one.sh.in from auto-tools build.

commit e524af11d04938103d42963e393b3637616dc278
Author: Brad Bell <bradbell@…>
Date: Fri Mar 18 10:02:38 2016 -0700

Move solve.cpp -> ipopt_solve.cpp so has same name as its directory.

commit 4714099e4eef9226536760e206f988440eec2f48
Author: Brad Bell <bradbell@…>
Date: Fri Mar 18 09:50:37 2016 -0700

Use system include option to supress all warnings in eigen and fadbad source.

  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# $Id: CMakeLists.txt 3803 2016-03-19 05:07:48Z bradbell $
2# -----------------------------------------------------------------------------
3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
4#
5# CppAD is distributed under multiple licenses. This distribution is under
6# the terms of the
7#                     Eclipse Public License Version 1.0.
8#
9# A copy of this license is included in the COPYING file of this distribution.
10# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11# -----------------------------------------------------------------------------
12# Build the example directory tests
13# Inherit environment from ../CMakeList.txt
14
15# Specifies build type for this directory. Possible values are
16# empty, Debug, Release, RelWithDebInfo and MinSizeRel
17SET(CMAKE_BUILD_TYPE DEBUG)
18
19# initialize check_depends
20SET(check_depends example)
21
22# atomic examples
23ADD_SUBDIRECTORY(atomic)
24add_to_list(check_depends check_example_atomic)
25
26# adolc_prefix
27SET(sources mul_level_adolc.cpp mul_level_adolc_ode.cpp)
28sources_libs_define(adolc "${sources}" adolc ADOLC_EXAMPLES)
29
30# colpack_prefix
31SET(colpack_sources
32        colpack_hes.cpp
33        colpack_jac.cpp
34)
35
36# eigen_prefix
37IF ( eigen_prefix )
38        # compile eigen library separately so can use different compiler flags
39        ADD_LIBRARY(example_eigen_lib EXCLUDE_FROM_ALL
40                eigen_det.cpp
41                eigen_array.cpp
42        )
43        # Adds -D define flags to the compilation of source files.
44        ADD_DEFINITIONS("-DCPPAD_EIGEN_EXAMPLES")
45        add_cppad_cxx_flags(example_eigen_lib)
46        #
47        # Add eigen to list of libraries
48        SET(eigen_libs example_eigen_lib)
49ELSE ( eigen_prefix )
50        SET(eigen_libs "")
51ENDIF ( eigen_prefix )
52
53# ipopt_prefix
54IF( ipopt_prefix )
55        ADD_SUBDIRECTORY(ipopt_solve)
56        add_to_list(check_depends check_example_ipopt_solve)
57ENDIF( ipopt_prefix )
58
59
60# add_executable(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
61#                 source1 source2 ... sourceN
62# )
63ADD_EXECUTABLE(example EXCLUDE_FROM_ALL example.cpp
64        ${adolc_sources}
65        ${colpack_sources}
66        abort_recording.cpp
67        abs.cpp
68        acos.cpp
69        acosh.cpp
70        add.cpp
71        add_eq.cpp
72        ad_assign.cpp
73        ad_ctor.cpp
74        ad_fun.cpp
75        ad_in_c.cpp
76        ad_input.cpp
77        ad_output.cpp
78        asin.cpp
79        asinh.cpp
80        atan.cpp
81        atanh.cpp
82        atan2.cpp
83        azmul.cpp
84        base_alloc.hpp
85        base_require.cpp
86        bender_quad.cpp
87        bool_fun.cpp
88        bool_sparsity.cpp
89        capacity_order.cpp
90        change_param.cpp
91        check_for_nan.cpp
92        check_numeric_type.cpp
93        check_simple_vector.cpp
94        compare.cpp
95        compare_change.cpp
96        complex_poly.cpp
97        cond_exp.cpp
98        conj_grad.cpp
99        cos.cpp
100        cosh.cpp
101        cppad_vector.cpp
102        dependency.cpp
103        div.cpp
104        div_eq.cpp
105        equal_op_seq.cpp
106        erf.cpp
107        error_handler.cpp
108        exp.cpp
109        expm1.cpp
110        for_one.cpp
111        for_two.cpp
112        forward.cpp
113        forward_dir.cpp
114        forward_order.cpp
115        for_sparse_hes.cpp
116        for_sparse_jac.cpp
117        fun_assign.cpp
118        fun_check.cpp
119        hes_lagrangian.cpp
120        hes_lu_det.cpp
121        hes_minor_det.cpp
122        hessian.cpp
123        hes_times_dir.cpp
124        independent.cpp
125        index_sort.cpp
126        integer.cpp
127        interface2c.cpp
128        interp_onetape.cpp
129        interp_retape.cpp
130        jac_lu_det.cpp
131        jac_minor_det.cpp
132        jacobian.cpp
133        num_limits.cpp
134        log.cpp
135        log1p.cpp
136        log10.cpp
137        lu_factor.cpp
138        lu_invert.cpp
139        lu_ratio.cpp
140        lu_solve.cpp
141        lu_vec_ad.cpp
142        lu_vec_ad.hpp
143        lu_vec_ad_ok.cpp
144        mul.cpp
145        mul_eq.cpp
146        mul_level.cpp
147        mul_level_ode.cpp
148        nan.cpp
149        near_equal.cpp
150        near_equal_ext.cpp
151        number_skip.cpp
152        numeric_type.cpp
153        ode_err_control.cpp
154        ode_err_maxabs.cpp
155        ode_gear.cpp
156        ode_gear_control.cpp
157        ode_stiff.cpp
158        ode_taylor.cpp
159        opt_val_hes.cpp
160        optimize.cpp
161        par_var.cpp
162        poly.cpp
163        pow.cpp
164        pow_int.cpp
165        print_for.cpp
166        reverse_checkpoint.cpp
167        reverse_one.cpp
168        reverse_three.cpp
169        reverse_two.cpp
170        rev_one.cpp
171        rev_sparse_hes.cpp
172        rev_sparse_jac.cpp
173        rev_two.cpp
174        romberg_mul.cpp
175        romberg_one.cpp
176        rosen_34.cpp
177        runge45_1.cpp
178        runge45_2.cpp
179        seq_property.cpp
180        simple_vector.cpp
181        sign.cpp
182        sin.cpp
183        sinh.cpp
184        sparse_hessian.cpp
185        sparse_jacobian.cpp
186        sparse_sub_hes.cpp
187        sparsity_sub.cpp
188        sqrt.cpp
189        stack_machine.cpp
190        sub.cpp
191        sub_eq.cpp
192        sub_sparse_hes.cpp
193        tan.cpp
194        tanh.cpp
195        tape_index.cpp
196        thread_alloc.cpp
197        to_string.cpp
198        unary_minus.cpp
199        unary_plus.cpp
200        value.cpp
201        var2par.cpp
202        vec_ad.cpp
203        vector_bool.cpp
204)
205
206# Compiler flags for cppad source
207add_cppad_cxx_flags(example)
208
209# List of libraries to be linked into the specified target
210TARGET_LINK_LIBRARIES(example
211        ${cppad_lib}
212        ${adolc_libs}
213        ${colpack_libs}
214        ${eigen_libs}
215)
216
217# Add the check_example target
218ADD_CUSTOM_TARGET(check_example example DEPENDS ${check_depends})
Note: See TracBrowser for help on using the repository browser.