source: trunk/example/CMakeLists.txt @ 3799

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

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 6518e6ada7aae61661e784e153eb32eb7005ee9a
end hash code: 75b01bb9161cfeaea61b02acaded4f30c6e58262

commit 75b01bb9161cfeaea61b02acaded4f30c6e58262
Author: Brad Bell <bradbell@…>
Date: Fri Mar 11 19:05:06 2016 -0700

Add see also between checkpoint and reverse_checkpoint.cpp.

commit 468fd0809a916414078859ba36368744880ef16f
Author: Brad Bell <bradbell@…>
Date: Fri Mar 11 07:33:12 2016 -0700

  1. Advance to version cppad-20160311.
  2. Move reverse_any.cpp -> reverse_checkpoing.cpp (better name).

commit 916a862332b5e129acae8da8f460fa55dd134fa5
Author: Brad Bell <bradbell@…>
Date: Fri Mar 11 06:10:42 2016 -0700

checkpoint.cpp: fix typo in displayed equation.

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1# $Id: CMakeLists.txt 3799 2016-03-12 12:33:53Z 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# Copy a file to another location and modify its contents.
61# configure_file(InputFile OutputFile [COPYONLY] [ESCAPE_QUOTES] [@ONLY])
62CONFIGURE_FILE(
63        ${CMAKE_CURRENT_SOURCE_DIR}/test_one.sh.in
64        ${CMAKE_CURRENT_SOURCE_DIR}/test_one.sh
65)
66
67
68# add_executable(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
69#                 source1 source2 ... sourceN
70# )
71ADD_EXECUTABLE(example EXCLUDE_FROM_ALL example.cpp
72        ${adolc_sources}
73        ${colpack_sources}
74        abort_recording.cpp
75        abs.cpp
76        acos.cpp
77        acosh.cpp
78        add.cpp
79        add_eq.cpp
80        ad_assign.cpp
81        ad_ctor.cpp
82        ad_fun.cpp
83        ad_in_c.cpp
84        ad_input.cpp
85        ad_output.cpp
86        asin.cpp
87        asinh.cpp
88        atan.cpp
89        atanh.cpp
90        atan2.cpp
91        azmul.cpp
92        base_alloc.hpp
93        base_require.cpp
94        bender_quad.cpp
95        bool_fun.cpp
96        bool_sparsity.cpp
97        capacity_order.cpp
98        change_param.cpp
99        check_for_nan.cpp
100        check_numeric_type.cpp
101        check_simple_vector.cpp
102        compare.cpp
103        compare_change.cpp
104        complex_poly.cpp
105        cond_exp.cpp
106        conj_grad.cpp
107        cos.cpp
108        cosh.cpp
109        cppad_vector.cpp
110        dependency.cpp
111        div.cpp
112        div_eq.cpp
113        equal_op_seq.cpp
114        erf.cpp
115        error_handler.cpp
116        exp.cpp
117        expm1.cpp
118        for_one.cpp
119        for_two.cpp
120        forward.cpp
121        forward_dir.cpp
122        forward_order.cpp
123        for_sparse_hes.cpp
124        for_sparse_jac.cpp
125        fun_assign.cpp
126        fun_check.cpp
127        hes_lagrangian.cpp
128        hes_lu_det.cpp
129        hes_minor_det.cpp
130        hessian.cpp
131        hes_times_dir.cpp
132        independent.cpp
133        index_sort.cpp
134        integer.cpp
135        interface2c.cpp
136        interp_onetape.cpp
137        interp_retape.cpp
138        jac_lu_det.cpp
139        jac_minor_det.cpp
140        jacobian.cpp
141        num_limits.cpp
142        log.cpp
143        log1p.cpp
144        log10.cpp
145        lu_factor.cpp
146        lu_invert.cpp
147        lu_ratio.cpp
148        lu_solve.cpp
149        lu_vec_ad.cpp
150        lu_vec_ad.hpp
151        lu_vec_ad_ok.cpp
152        mul.cpp
153        mul_eq.cpp
154        mul_level.cpp
155        mul_level_ode.cpp
156        nan.cpp
157        near_equal.cpp
158        near_equal_ext.cpp
159        number_skip.cpp
160        numeric_type.cpp
161        ode_err_control.cpp
162        ode_err_maxabs.cpp
163        ode_gear.cpp
164        ode_gear_control.cpp
165        ode_stiff.cpp
166        ode_taylor.cpp
167        opt_val_hes.cpp
168        optimize.cpp
169        par_var.cpp
170        poly.cpp
171        pow.cpp
172        pow_int.cpp
173        print_for.cpp
174        reverse_checkpoint.cpp
175        reverse_one.cpp
176        reverse_three.cpp
177        reverse_two.cpp
178        rev_one.cpp
179        rev_sparse_hes.cpp
180        rev_sparse_jac.cpp
181        rev_two.cpp
182        romberg_mul.cpp
183        romberg_one.cpp
184        rosen_34.cpp
185        runge45_1.cpp
186        runge45_2.cpp
187        seq_property.cpp
188        simple_vector.cpp
189        sign.cpp
190        sin.cpp
191        sinh.cpp
192        sparse_hessian.cpp
193        sparse_jacobian.cpp
194        sparse_sub_hes.cpp
195        sparsity_sub.cpp
196        sqrt.cpp
197        stack_machine.cpp
198        sub.cpp
199        sub_eq.cpp
200        sub_sparse_hes.cpp
201        tan.cpp
202        tanh.cpp
203        tape_index.cpp
204        thread_alloc.cpp
205        to_string.cpp
206        unary_minus.cpp
207        unary_plus.cpp
208        value.cpp
209        var2par.cpp
210        vec_ad.cpp
211        vector_bool.cpp
212)
213
214# Compiler flags for cppad source
215add_cppad_cxx_flags(example)
216
217# List of libraries to be linked into the specified target
218TARGET_LINK_LIBRARIES(example
219        ${cppad_lib}
220        ${adolc_libs}
221        ${colpack_libs}
222        ${eigen_libs}
223)
224
225# Add the check_example target
226ADD_CUSTOM_TARGET(check_example example DEPENDS ${check_depends})
Note: See TracBrowser for help on using the repository browser.