source: trunk/example/CMakeLists.txt @ 3746

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

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 57d3215cae5e9da7b4c92e89f038d70870ef7327
end hash code: 9aebc1ca2c0949dec7c2d156517db26e60f28159

commit 9aebc1ca2c0949dec7c2d156517db26e60f28159
Author: Brad Bell <bradbell@…>
Date: Sun Nov 8 20:15:38 2015 -0800

Remove invisible white space.

commit a92ac50e9f4c8d0007ea5a245b3e23145dfcebfe
Author: Brad Bell <bradbell@…>
Date: Sun Nov 8 20:15:31 2015 -0800

Use vectorBool with partial sparsity patterns per pass to reduce memory requirements.


solve_callback.hpp: remove invisible white space.
rev_sparse_jac.hpp: fix bug (argument transposed).
bool_sparsity.cpp: remove invisible white space.

commit c09744b13ba2c70d6ffa857206d45560154d800a
Author: Brad Bell <bradbell@…>
Date: Sun Nov 8 03:22:57 2015 -0800

check_for_nan.hpp: fix minor type in documentation.

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1# $Id: CMakeLists.txt 3746 2015-11-09 04:50:27Z bradbell $
2# -----------------------------------------------------------------------------
3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 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(sources
32        colpack_hes.cpp
33        colpack_jac.cpp
34        ../cppad/local/cppad_colpack.cpp
35)
36sources_libs_define(colpack "${sources}" ColPack COLPACK_EXAMPLES)
37
38# eigen_prefix
39IF ( eigen_prefix )
40        # compile eigen library separately so can use different compiler flags
41        ADD_LIBRARY(example_eigen_lib EXCLUDE_FROM_ALL
42                eigen_det.cpp
43                eigen_array.cpp
44        )
45        # Adds -D define flags to the compilation of source files.
46        ADD_DEFINITIONS("-DCPPAD_EIGEN_EXAMPLES")
47        add_cppad_cxx_flags(example_eigen_lib)
48        #
49        # Add eigen to list of libraries
50        SET(eigen_libs example_eigen_lib)
51ELSE ( eigen_prefix )
52        SET(eigen_libs "")
53ENDIF ( eigen_prefix )
54
55# ipopt_prefix
56IF( ipopt_prefix )
57        ADD_SUBDIRECTORY(ipopt_solve)
58        add_to_list(check_depends check_example_ipopt_solve)
59ENDIF( ipopt_prefix )
60
61
62# Copy a file to another location and modify its contents.
63# configure_file(InputFile OutputFile [COPYONLY] [ESCAPE_QUOTES] [@ONLY])
64CONFIGURE_FILE(
65        ${CMAKE_CURRENT_SOURCE_DIR}/test_one.sh.in
66        ${CMAKE_CURRENT_SOURCE_DIR}/test_one.sh
67)
68
69
70# add_executable(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
71#                 source1 source2 ... sourceN
72# )
73ADD_EXECUTABLE(example EXCLUDE_FROM_ALL example.cpp
74        ${adolc_sources}
75        ${colpack_sources}
76        abort_recording.cpp
77        abs.cpp
78        acos.cpp
79        acosh.cpp
80        add.cpp
81        add_eq.cpp
82        ad_assign.cpp
83        ad_ctor.cpp
84        ad_fun.cpp
85        ad_in_c.cpp
86        ad_input.cpp
87        ad_output.cpp
88        asin.cpp
89        asinh.cpp
90        atan.cpp
91        atanh.cpp
92        atan2.cpp
93        azmul.cpp
94        base_alloc.hpp
95        base_require.cpp
96        bender_quad.cpp
97        bool_fun.cpp
98        bool_sparsity.cpp
99        capacity_order.cpp
100        change_param.cpp
101        check_for_nan.cpp
102        check_numeric_type.cpp
103        check_simple_vector.cpp
104        compare.cpp
105        compare_change.cpp
106        complex_poly.cpp
107        cond_exp.cpp
108        conj_grad.cpp
109        cos.cpp
110        cosh.cpp
111        cppad_vector.cpp
112        dependency.cpp
113        div.cpp
114        div_eq.cpp
115        equal_op_seq.cpp
116        erf.cpp
117        error_handler.cpp
118        exp.cpp
119        expm1.cpp
120        for_one.cpp
121        for_two.cpp
122        forward.cpp
123        forward_dir.cpp
124        forward_order.cpp
125        for_sparse_jac.cpp
126        fun_assign.cpp
127        fun_check.cpp
128        hes_lagrangian.cpp
129        hes_lu_det.cpp
130        hes_minor_det.cpp
131        hessian.cpp
132        hes_times_dir.cpp
133        independent.cpp
134        index_sort.cpp
135        integer.cpp
136        interface2c.cpp
137        interp_onetape.cpp
138        interp_retape.cpp
139        jac_lu_det.cpp
140        jac_minor_det.cpp
141        jacobian.cpp
142        num_limits.cpp
143        log.cpp
144        log1p.cpp
145        log10.cpp
146        lu_factor.cpp
147        lu_invert.cpp
148        lu_ratio.cpp
149        lu_solve.cpp
150        lu_vec_ad.cpp
151        lu_vec_ad.hpp
152        lu_vec_ad_ok.cpp
153        mul.cpp
154        mul_eq.cpp
155        mul_level.cpp
156        mul_level_ode.cpp
157        nan.cpp
158        near_equal.cpp
159        near_equal_ext.cpp
160        number_skip.cpp
161        numeric_type.cpp
162        ode_err_control.cpp
163        ode_err_maxabs.cpp
164        ode_gear.cpp
165        ode_gear_control.cpp
166        ode_stiff.cpp
167        ode_taylor.cpp
168        opt_val_hes.cpp
169        optimize.cpp
170        par_var.cpp
171        poly.cpp
172        pow.cpp
173        pow_int.cpp
174        print_for.cpp
175        reverse_any.cpp
176        reverse_one.cpp
177        reverse_three.cpp
178        reverse_two.cpp
179        rev_one.cpp
180        rev_sparse_hes.cpp
181        rev_sparse_jac.cpp
182        rev_two.cpp
183        romberg_mul.cpp
184        romberg_one.cpp
185        rosen_34.cpp
186        runge45_1.cpp
187        runge45_2.cpp
188        seq_property.cpp
189        simple_vector.cpp
190        sign.cpp
191        sin.cpp
192        sinh.cpp
193        sparse_hessian.cpp
194        sparse_jacobian.cpp
195        sparse_sub_hes.cpp
196        sparsity_sub.cpp
197        sqrt.cpp
198        stack_machine.cpp
199        sub.cpp
200        sub_eq.cpp
201        sub_sparse_hes.cpp
202        tan.cpp
203        tanh.cpp
204        tape_index.cpp
205        thread_alloc.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        ${adolc_libs}
220        ${colpack_libs}
221        ${eigen_libs}
222)
223
224# Add the check_example target
225ADD_CUSTOM_TARGET(check_example example DEPENDS ${check_depends})
Note: See TracBrowser for help on using the repository browser.