source: trunk/test_more/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: 3.6 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 test_more 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# This directory now contains omp_alloc.cpp which uses multi-threading, so
20# so no longer can set CPPAD_MAX_NUM_THREADS equal to one (its smallest value)
21# ADD_DEFINITIONS("-DCPPAD_MAX_NUM_THREADS=1")
22
23# adolc_prefix
24SET(sources base_adolc.cpp)
25sources_libs_define(adolc "${sources}" adolc ADOLC_TEST)
26
27# ipopt_prefix
28SET(sources ipopt_solve.cpp)
29sources_libs_define(ipopt "${sources}" "${ipopt_LIBRARIES}" IPOPT_TEST)
30
31# sources that use eigen
32IF ( eigen_prefix )
33        # compile eigen library separately so can use different compiler flags
34        ADD_LIBRARY(test_more_eigen_lib EXCLUDE_FROM_ALL
35                cppad_eigen.cpp
36        )
37        # Adds -D define flags to the compilation of source files.
38        ADD_DEFINITIONS("-DCPPAD_EIGEN_TEST")
39        # Add other compiler flags
40        add_cppad_cxx_flags(test_more_eigen_lib)
41        #
42        # Add eigen to list of libraries
43        SET(eigen_libs test_more_eigen_lib)
44ELSE ( eigen_prefix )
45        SET(eigen_sources "")
46        SET(eigen_libs "")
47ENDIF ( eigen_prefix )
48
49# add_executable(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
50#                 source1 source2 ... sourceN
51# )
52ADD_EXECUTABLE(test_more EXCLUDE_FROM_ALL test_more.cpp
53        old_usead_2.cpp
54        old_usead_1.cpp
55        old_tan.cpp
56        old_reciprocal.cpp
57        old_mat_mul.cpp
58        ${adolc_sources}
59        ${ipopt_sources}
60        abs.cpp
61        acos.cpp
62        acosh.cpp
63        adfun_copy.cpp
64        asin.cpp
65        asinh.cpp
66        assign.cpp
67        add.cpp
68        add_eq.cpp
69        add_zero.cpp
70        atan.cpp
71        atanh.cpp
72        atan2.cpp
73        azmul.cpp
74        base_alloc.cpp
75        check_simple_vector.cpp
76        checkpoint.cpp
77        compare.cpp
78        compare_change.cpp
79        cond_exp.cpp
80        cond_exp_ad.cpp
81        cond_exp_rev.cpp
82        copy.cpp
83        cos.cpp
84        cosh.cpp
85        dbl_epsilon.cpp
86        div.cpp
87        div_eq.cpp
88        div_zero_one.cpp
89        erf.cpp
90        exp.cpp
91        expm1.cpp
92        extern_value.cpp
93        for_hess.cpp
94        for_sparse_hes.cpp
95        for_sparse_jac.cpp
96        forward.cpp
97        forward_dir.cpp
98        forward_order.cpp
99        from_base.cpp
100        fun_check.cpp
101        hes_sparsity.cpp
102        jacobian.cpp
103        num_limits.cpp
104        log.cpp
105        log1p.cpp
106        log10.cpp
107        mul.cpp
108        mul_cskip.cpp
109        mul_eq.cpp
110        mul_level.cpp
111        mul_cond_rev.cpp
112        mul_zdouble.cpp
113        mul_zero_one.cpp
114        near_equal_ext.cpp
115        neg.cpp
116        ode_err_control.cpp
117        omp_alloc.cpp
118        optimize.cpp
119        parameter.cpp
120        poly.cpp
121        pow.cpp
122        pow_int.cpp
123        print_for.cpp
124        romberg_one.cpp
125        rosen_34.cpp
126        runge_45.cpp
127        reverse.cpp
128        rev_sparse_jac.cpp
129        rev_two.cpp
130        simple_vector.cpp
131        sin.cpp
132        sin_cos.cpp
133        sinh.cpp
134        sparse_hessian.cpp
135        sparse_jacobian.cpp
136        sparse_vec_ad.cpp
137        sqrt.cpp
138        std_math.cpp
139        sub.cpp
140        sub_eq.cpp
141        sub_zero.cpp
142        tan.cpp
143        test_vector.cpp
144        to_string.cpp
145        track_new_del.cpp
146        value.cpp
147        vec_ad.cpp
148        vec_ad_par.cpp
149        vec_unary.cpp
150        zdouble.cpp
151
152        local/vector_set.cpp
153)
154
155# Compiler flags for cppad source
156add_cppad_cxx_flags(test_more)
157
158# List of libraries to be linked into the specified target
159TARGET_LINK_LIBRARIES(test_more
160        ${cppad_lib}
161        ${adolc_libs}
162        ${ipopt_libs}
163        ${eigen_libs}
164        ${colpack_libs}
165)
166
167# Add the check_test_more target
168ADD_CUSTOM_TARGET( check_test_more test_more DEPENDS test_more )
Note: See TracBrowser for help on using the repository browser.