master: 1. Make sure variable passed to CHECK_CXX_SOURCE_RUNS is not defined.
2. Fix some recent tabs by convertnng them to spaces.
speed_test.hpp: Add some See Also links.
Brad Bell
5 years ago
71 | 71 | git add --all |
72 | 72 | git commit -m 'master: change to stable version number' |
73 | 73 | gh_pages.sh |
74 | git commit -m 'update gh-pages to version $stable_version' | |
75 | git push | |
76 | git checkout master | |
74 | git commit -m 'update gh-pages to version $stable_version' | |
75 | git push | |
76 | git checkout master | |
77 | 77 | EOF |
78 | rm new_release.$$ | |
79 | exit 1 | |
78 | rm new_release.$$ | |
79 | exit 1 | |
80 | 80 | fi |
81 | 81 | rm new_release.$$ |
82 | 82 | # ============================================================================= |
206 | 206 | # tag the documentation |
207 | 207 | # |
208 | 208 | echo_eval git tag -a -m \"created by bin/new_release.sh\" \ |
209 | $stable_version.doc $doc_hash | |
209 | $stable_version.doc $doc_hash | |
210 | 210 | # |
211 | 211 | echo_eval git push origin $stable_version.doc |
212 | 212 | # ============================================================================= |
0 | 0 | # ----------------------------------------------------------------------------- |
1 | # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell | |
1 | # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-18 Bradley M. Bell | |
2 | 2 | # |
3 | 3 | # CppAD is distributed under the terms of the |
4 | 4 | # Eclipse Public License Version 2.0. |
12 | 12 | # |
13 | 13 | # source: (in) |
14 | 14 | # contains the source for the program that will be run. |
15 | # | |
15 | # | |
16 | 16 | # variable: (out) |
17 | # the value of this variable is 1 if the program runs and | |
17 | # This variable must not be defined when this macro is called. | |
18 | # Upon return, the value of this variable is 1 if the program runs and | |
18 | 19 | # returns a zero status. Otherwise its value is 0. |
19 | 20 | # Note that this is the reverse of the status flag returned by the program. |
20 | # | |
21 | # | |
21 | 22 | MACRO(check_source_runs source variable) |
23 | IF( DEFINED ${variable} ) | |
24 | MESSAGE(ERROR | |
25 | "check_source_runs: expected ${variable} to not be defined" | |
26 | ) | |
27 | ENDIF( DEFINED ${variable} ) | |
22 | 28 | SET(CMAKE_REQUIRED_INCLUDES "" ) |
23 | 29 | SET(CMAKE_REQUIRED_LIBRARIES "" ) |
24 | 30 | SET(CMAKE_REQUIRED_DEFINITIONS "" ) |
27 | 33 | ELSE( cppad_cxx_flags ) |
28 | 34 | SET(CMAKE_REQUIRED_FLAGS "" ) |
29 | 35 | ENDIF( cppad_cxx_flags ) |
30 | CHECK_CXX_SOURCE_RUNS("${source}" ${variable}_result) | |
31 | IF( ${variable}_result ) | |
36 | CHECK_CXX_SOURCE_RUNS("${source}" ${variable} ) | |
37 | IF( ${variable} ) | |
32 | 38 | SET(${variable} 1) |
33 | ELSE( ${variable}_result ) | |
39 | ELSE( ${variable} ) | |
34 | 40 | SET(${variable} 0) |
35 | ENDIF( ${variable}_result ) | |
41 | ENDIF( ${variable} ) | |
36 | 42 | MESSAGE(STATUS "${variable} = ${${variable}}" ) |
37 | 43 | ENDMACRO( check_source_runs ) |
72 | 72 | |
73 | 73 | $table |
74 | 74 | $href%https://github.com/coin-or/CppAD/releases% |
75 | releases%$$, $cnext | |
75 | releases%$$, $cnext | |
76 | 76 | $href%https://github.com/coin-or/CppAD/archive/20190200.0.tar.gz% |
77 | 20190200.0%$$, $cnext | |
77 | 20190200.0%$$, $cnext | |
78 | 78 | $href%https://github.com/coin-or/CppAD% |
79 | github%$$, $cnext | |
79 | github%$$, $cnext | |
80 | 80 | $href%https://travis-ci.org/coin-or/CppAD% |
81 | travis%$$, $cnext | |
81 | travis%$$, $cnext | |
82 | 82 | $href%https://ci.appveyor.com/project/bradbell/cppad% |
83 | appveyor%$$, $cnext | |
83 | appveyor%$$, $cnext | |
84 | 84 | $href%https://src.fedoraproject.org/rpms/cppad/blob/master/f/cppad.spec% |
85 | cppad.spec%$$ $cnext | |
85 | cppad.spec%$$ $cnext | |
86 | 86 | $tend |
87 | 87 | $pre |
88 | 88 |
51 | 51 | # abort this search when find a match |
52 | 52 | IF( NOT bthread_lib ) |
53 | 53 | # |
54 | SET(CMAKE_REQUIRED_DEFINITIONS "") | |
54 | 55 | SET(CMAKE_REQUIRED_INCLUDES "${boost_prefix}/${idir}") |
55 | 56 | SET(CMAKE_REQUIRED_LIBRARIES "${lname}" ) |
56 | 57 | SET(lpath "${boost_prefix}/${ldir}" ) |
63 | 64 | return 0; |
64 | 65 | }" ) |
65 | 66 | SET(flag ${idir}_${ldir}_${lname}_ok ) |
67 | UNSET( $flag ) | |
66 | 68 | CHECK_CXX_SOURCE_RUNS("${source}" ${flag} ) |
67 | 69 | IF ( ${flag} ) |
68 | 70 | SET(bthread_lib ${lname} ) |
220 | 220 | # ----------------------------------------------------------------------------- |
221 | 221 | # check that cppad_max_num_threads is >= 4 |
222 | 222 | # |
223 | SET(CMAKE_REQUIRED_INCLUDES "") | |
224 | SET(CMAKE_REQUIRED_LIBRARIES "") | |
225 | SET(CMAKE_REQUIRED_FLAGS ) | |
223 | SET(CMAKE_REQUIRED_DERINITIONS "") | |
224 | SET(CMAKE_REQUIRED_INCLUDES "") | |
225 | SET(CMAKE_REQUIRED_LIBRARIES "") | |
226 | SET(CMAKE_REQUIRED_FLAGS "") | |
226 | 227 | SET(source " |
227 | 228 | int main(void) |
228 | 229 | { const char* number = \"${cppad_max_num_threads}\"; |
243 | 244 | } |
244 | 245 | " ) |
245 | 246 | # Using CHECK_CXX_SOURCE_RUNS directly (instead of check_source_runs). |
246 | CHECK_CXX_SOURCE_RUNS("${source}" cppad_max_num_threads_is_integer_ge_4) | |
247 | UNSET( cppad_max_num_threads_is_integer_ge_4 ) | |
248 | CHECK_CXX_SOURCE_RUNS("${source}" cppad_max_num_threads_is_integer_ge_4 ) | |
247 | 249 | IF( NOT cppad_max_num_threads_is_integer_ge_4 ) |
248 | 250 | MESSAGE(FATAL_ERROR |
249 | 251 | "cppad_max_num_threads is not an integer greater than or equal 4" |
28 | 28 | ENDFOREACH(sign signed unsigned) |
29 | 29 | ENDFOREACH(base_type) |
30 | 30 | # |
31 | SET(CMAKE_REQUIRED_DERINITIONS "") | |
32 | SET(CMAKE_REQUIRED_INCLUDES "") | |
33 | SET(CMAKE_REQUIRED_LIBRARIES "") | |
34 | SET(CMAKE_REQUIRED_FLAGS "") | |
31 | 35 | FOREACH(pod_type ${pod_type_list}) |
32 | 36 | STRING(REPLACE " " "_" pod_type_var "${pod_type}") |
33 | 37 | SET(pod_type_var "pod_type_${pod_type_var}") |
37 | 41 | SET(source |
38 | 42 | "${is_pod_default} ${is_pod_specialize_98} ${line} ${is_pod_main}" |
39 | 43 | ) |
44 | IF( DEFINED ${pod_type_var} ) | |
45 | MESSAGE(ERROR "{pod_type_var} is defined before expected") | |
46 | ENDIF( DEFINED ${pod_type_var} ) | |
40 | 47 | CHECK_CXX_SOURCE_RUNS("${source}" ${pod_type_var} ) |
41 | 48 | IF( ${pod_type_var} ) |
42 | 49 | SET(is_pod_specialize_98 "${is_pod_specialize_98}${line}") |
62 | 69 | "${is_pod_default} ${is_pod_specialize_98} ${is_pod_specialize_11} |
63 | 70 | ${line} ${is_pod_main}" |
64 | 71 | ) |
72 | IF( DEFINED ${pod_type_var} ) | |
73 | MESSAGE(ERROR "{pod_type_var} is defined before expected") | |
74 | ENDIF( DEFINED ${pod_type_var} ) | |
65 | 75 | CHECK_CXX_SOURCE_RUNS("${source}" ${pod_type_var} ) |
66 | 76 | IF( ${pod_type_var} ) |
67 | 77 | SET(is_pod_specialize_11 "${is_pod_specialize_11}${line}") |
36 | 36 | $codei%# include <cppad/utility/speed_test.hpp> |
37 | 37 | %$$ |
38 | 38 | $icode%rate_vec% = speed_test(%test%, %size_vec%, %time_min%)%$$ |
39 | ||
40 | $head See Also$$ | |
41 | $cref time_test$$ | |
39 | 42 | |
40 | 43 | $head Purpose$$ |
41 | 44 | The $code speed_test$$ function executes a speed test |
210 | 213 | %$$ |
211 | 214 | $codei%SpeedTest(%Test%, %first%, %inc%, %last%)%$$ |
212 | 215 | |
216 | $head See Also$$ | |
217 | $cref time_test$$ | |
213 | 218 | |
214 | 219 | $head Purpose$$ |
215 | 220 | The $code SpeedTest$$ function executes a speed test |