source: trunk/omh/install/cmake.omh @ 3941

Last change on this file since 3941 was 3941, checked in by bradbell, 2 years ago

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

commit c8c4cc081accff3628e7e66370ec01e4c99afe8d
Author: Brad Bell <bradbell@…>
Date: Thu Jun 1 23:16:39 2017 -0600

Changes automatically generated by the autotools.

commit f4392bc3eee8f6d0ccd45a0bb3be51181e211680
Author: Brad Bell <bradbell@…>
Date: Thu Jun 1 23:11:56 2017 -0600

  1. Add colpack_jac.cpp example (rename colpack_jac.cpp->colpack_jacobian.cpp).
  2. Add colpack_hescpp example (rename colpack_hes.cpp->colpack_hessian.cpp).


test_one.sh.in: adapt to using test_boolofvoid for testing.
sparse_hes.hpp: fix bug in cppad.symmetric case.

commit 086b8a8709b0c9cb01ce2cf8bc7910e903105ff7
Author: Brad Bell <bradbell@…>
Date: Thu Jun 1 08:54:59 2017 -0600

  1. Fix bug in use of colpack (see kludge in comments).
  2. Fix colpack.symmetric (not general) and add colpack.general.
  3. Deprecate colpack.star.
  4. More autotools from install to deprecated.
  5. Advance to cppad-20170601.

commit 23f26c060648f5c6fc62a1598c659aeccc5ca46f
Author: Brad Bell <bradbell@…>
Date: Tue May 30 08:14:04 2017 -0700

Advance to cppad-20170530.

commit 97f8c08509865d1bfb7ec2e5cd557ddc979f8412
Author: Brad Bell <bradbell@…>
Date: Tue May 30 07:38:47 2017 -0700

debug_rel branch:
There is a problem with speed sparse_hessian debug that goes back to master.
Supresss debug in cppad speed tests until it is fixed.

commit 39ea0d7d9c041784ccd26ce80d19a7ab02752818
Author: Brad Bell <bradbell@…>
Date: Mon May 29 22:34:22 2017 -0700

debug_rel branch:
run_cmake.sh: fix debug_none case.
CMakeLists.txt: use cppad_debug_which to determine debug or release.
CMakeLists.txt: let set_compile_flags determkine build type.

commit 191553e54dca407207789cf0d7c6c27fe6188775
Author: Brad Bell <bradbell@…>
Date: Mon May 29 19:53:08 2017 -0700

debug_rel branch:
Use set_compile_flags in introduction.

commit fba276a84e58d9a0d0944168d5706b7446beb32c
Author: Brad Bell <bradbell@…>
Date: Mon May 29 19:46:30 2017 -0700

debug_rel branch:
Use set_compile_flags in eample/multi_thread subdirectories.

commit 66c8cdb266fa3af29b211b8c870a3aed7a13b021
Author: Brad Bell <bradbell@…>
Date: Mon May 29 18:56:48 2017 -0700

debug_rel branch:
Use set_compile_flags in speed directory.

commit c431b15ee7714d3106234bc527ba2f9a836750e1
Author: Brad Bell <bradbell@…>
Date: Mon May 29 18:36:51 2017 -0700

debug_rel branch:
Convert cppad_ipopt to use set_compile_flags and cppad_debug_which.


CMakeLists.txt: alwasy compile for release to reduce testing time.

commit 2c95b0019f1b665fb14b9f00b049e8b5fb11f89d
Author: Brad Bell <bradbell@…>
Date: Mon May 29 16:55:07 2017 -0700

debug_rel branch:
Add cppad_debug_which to the cmake command line.

commit fd8d1498cf6dc092deca41f764cbb2a001a4cc88
Author: Brad Bell <bradbell@…>
Date: Mon May 29 08:14:23 2017 -0700

debug_rel branch:
Change random_debug_release -> set_compile_flags.

commit 159f5a5aa09012213a52f4ed1c9f0607129a5fe7
Author: Brad Bell <bradbell@…>
Date: Mon May 29 06:50:43 2017 -0700

debug_rel branch:
Update the autotools automatically generated build files.


batch_edit.sh: Start comments about a plan for editing all the source files.
get_sacado.sh: advance to trilions-12.10.11.
makefile.am: advance to trilinos-12.10.1

commit 302153317cd296ec6f927c3202cf96bf38594bbb
Author: Brad Bell <bradbell@…>
Date: Mon May 29 05:20:00 2017 -0700

debug_rel branch:
Add error message if sacado configuration file does not exist.

commit 3f01a631ae808c3a1359e53e1cd55e9a0ea88711
Author: Brad Bell <bradbell@…>
Date: Mon May 29 04:24:00 2017 -0700

debug_rel branch:
CMakeLists.txt: automate naming of libraries Sacado needs.
checkpoint.cpp: fix warnings.

commit dd240928c0c8b6972a8197c985ccc01f08b8886b
Author: Brad Bell <bradbell@…>
Date: Sun May 28 08:25:20 2017 -0700

debug_rel branch:
sparse_sub_hes.cpp: add missing cases found by clang compiler.

commit 30a0c35f1ac50ec425be9a2b7b026284026eccd7
Author: Brad Bell <bradbell@…>
Date: Sun May 28 07:57:36 2017 -0700

debug_rel branch:
eigen_cholesky.hpp: fix compiler warning.
harmonic_time.cpp: remove include that is not used.
forward_active.cpp: fix compiler warning.

commit 4876d14e49dc235865b1574fb38a55cf5ea7a422
Author: Brad Bell <bradbell@…>
Date: Sun May 28 06:19:48 2017 -0700

debug_rel branch:
random_debug_release.cmake: fix comment, remove message replaced by random_choice_0123 in output.
multiple_solution.cpp: fix warnings with clang compiler.
eigen_cholesky.hpp: fix warnings with clang compiler.
compare_change.cpp: fix CPPAD_DEBUG_AND_RELEASE case.

commit 2c51a18f35188d04d2f94069382439580e23f4ac
Author: Brad Bell <bradbell@…>
Date: Sat May 27 21:04:37 2017 -0700

debug_rel branch:
Advance version to cppad-20170527.

commit 4500887b362537774b05e954ad2a95b65a7b8ba0
Author: Brad Bell <bradbell@…>
Date: Sat May 27 09:04:56 2017 -0700

debug_rel branch:
Ramdomly select debug or release flags in example directory.


CMakeLists.txt: always debug for multi_threed examples.

commit 140b5269a0b1a30643894e5a7a8c9a5eb1310301
Author: Brad Bell <bradbell@…>
Date: Sat May 27 08:10:51 2017 -0700

debug_rel branch:
Changing how we set all debug and release flags.

commit e6fb2639db1288fb75de4030b5906df1e41756f9
Author: Brad Bell <bradbell@…>
Date: Sat May 27 07:30:24 2017 -0700

debug_rel branch:
Replace use of cppad_extra_debug by CPPAD_DEBUG_AND_RELEASE.

commit fbbfd0f6e94862174a8a7a17308489ffddb28084
Author: Brad Bell <bradbell@…>
Date: Sat May 27 05:55:58 2017 -0700

debug_rel branch:
Improve random selection of which files are build for release or debug.


forward.cpp: use new -DCPPAD_DEBUG_AND_RELEASE flag.

commit 284be366fb5e2f685a0c71ea6a0e3f74584bf187
Author: Brad Bell <bradbell@…>
Date: Thu May 25 07:39:32 2017 -0700

debug_rel branch:
Add test that failed before change to player.


player.hpp: Fix so it has the same size in debug and release more.
checkpoint.cpp: fix warning when compiling for release.
run_cmake.sh: prepare to use random number to switch debug and release set.
CMakeLists.txt: switch to only test debug (for now).

commit f32375b77e3825628fee6cb160f691a32c48b796
Author: Brad Bell <bradbell@…>
Date: Wed May 24 12:04:27 2017 -0700

debug_rel branch:
forward.cpp: fix a warning during release build.

commit 5fcc7eb78ae8de9f1dbc6c4f0c76fe38e8aeba95
Author: Brad Bell <bradbell@…>
Date: Wed May 24 10:11:12 2017 -0700

debug_rel branch:
CMakeLists.txt: make easy to mix debug and release builds.
eigen_mat_inv.hpp: fix release version warning.

commit 696266f3d62079f5e3bfb1a0f60a7e4f8134e068
Author: Brad Bell <bradbell@…>
Date: Wed May 24 05:43:29 2017 -0700

push_git2svn.py: user ./build in place of ./build/work.
testvector.hpp: improve comments about replacing CPPAD_TESTVECTOR.

  • Property svn:keywords set to Id
File size: 13.5 KB
Line 
1/* --------------------------------------------------------------------------
2CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
3
4CppAD is distributed under multiple licenses. This distribution is under
5the terms of the
6                    Eclipse Public License Version 1.0.
7
8A copy of this license is included in the COPYING file of this distribution.
9Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
10-------------------------------------------------------------------------- */
11
12$begin cmake$$
13$escape $$
14$spell
15        cstdint
16        uint
17        pkgconfig
18        ctor
19        op
20        arg
21        sizeof
22        testvector
23        std
24        Wshadow
25        namespace
26        adouble
27        colpack
28        dir
29        makefile
30        usr
31        hpp
32        xml
33        ipopt
34        libcppad
35        CppAD
36        txt
37        Microsoft
38        Makefiles
39        cmake
40        Dcmake
41        cppad
42        adolc
43        boost
44        eigen
45        fadbad
46        sacado
47        datadir
48        docdir
49        includedirs
50        libdirs
51        cxx
52        max num
53        postfix
54        id
55        addr
56        grep
57$$
58
59$section Using CMake to Configure CppAD$$
60$mindex makefile install prefix postfix include directories lib datadir documentation package compile flags profile maximum number threads sparsity internal structure vector sets memory usage tape ctor implicit explicit$$
61
62
63$head The CMake Program$$
64The
65$href%http://www.cmake.org/cmake/help/install.html%cmake%$$
66program enables one to create a single set of scripts,
67called $code CMakeLists.txt$$,
68that can be used to test and install a program on Unix, Microsoft, or
69Apple operating systems.
70For example, one can use it to automatically generate Microsoft project files.
71
72$head CMake Command$$
73The command below assumes that $code cmake$$ is in your execution
74path with version greater than or equal 2.8.
75If not, you can put the path to the version of $code cmake$$
76in font the command.
77Only the $code cmake$$ command and the path to the distribution directory
78($code ..$$ at the end of the command below) are required.
79In other words, the first and last lines below are required
80and all of the other lines are optional.
81
82$subhead Build Directory$$
83Create a $code build$$ subdirectory of the
84$cref/distribution directory/download/Distribution Directory/$$,
85change into the $code build$$  directory,
86and execute the following command:
87$codei%
88cmake %%                                                                     \
89    -D CMAKE_VERBOSE_MAKEFILE=%cmake_verbose_makefile%                       \
90    -G %generator%                                                           \
91        \
92    -D cppad_prefix=%cppad_prefix%                                           \
93    -D cppad_postfix=%cppad_postfix%                                         \
94        \
95    -D cmake_install_includedirs=%cmake_install_includedirs%                 \
96    -D cmake_install_libdirs=%cmake_install_libdirs%                         \
97        \
98    -D cmake_install_datadir=%cmake_install_datadir%                         \
99    -D cmake_install_docdir=%cmake_install_docdir%                           \
100    \
101    -D adolc_prefix=%adolc_prefix%                                           \
102    -D colpack_prefix=%colpack_prefix%                                       \
103    -D eigen_prefix=%eigen_prefix%                                           \
104    -D fadbad_prefix=%fadbad_prefix%                                         \
105    -D ipopt_prefix=%ipopt_prefix%                                           \
106    -D sacado_prefix=%sacado_prefix%                                         \
107    \
108    -D cppad_cxx_flags=%cppad_cxx_flags%                                     \
109    -D cppad_profile_flag=%cppad_profile_flag%                               \
110    \
111    -D cppad_testvector=%cppad_testvector%                                   \
112    -D cppad_max_num_threads=%cppad_max_num_threads%                         \
113    -D cppad_tape_id_type=%cppad_tape_id_type%                               \
114    -D cppad_tape_addr_type=%cppad_tape_addr_type%                           \
115    -D cppad_debug_which=%cppad_debug_which%                                 \
116    -D cppad_deprecated=%cppad_deprecated%                                   \
117    \
118    ..
119%$$
120
121$head make check$$
122Important information about the CppAD configuration is output
123by this command. If you have the $code grep$$ program,
124and store the output in $code cmake.log$$, you can get a list of
125all the test options with the command:
126$codep
127        grep 'make check' cmake.log
128$$
129
130$head cmake_verbose_makefile$$
131This value should be either $code YES$$ or $code NO$$.
132The default value, when it is not present, is $code NO$$.
133If it is $code YES$$, then the output of the $code make$$ commands
134will include all of the files and flags used to run the compiler
135and linker. This can be useful for seeing how to compile and link
136your own applications.
137
138$head generator$$
139The CMake program is capable of generating different kinds of files.
140Below is a table with a few of the possible files
141$table
142$icode generator$$ $cnext Description $rnext
143$code "Unix Makefiles"$$   $cnext make files for unix operating system $rnext
144$code "NMake Makefiles"$$  $cnext make files for Visual Studio
145$tend
146Other generator choices are available; see the cmake
147$href%http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Generators%
148generators%$$ documentation.
149
150$head cppad_prefix$$
151This is the top level absolute path below which
152all of the CppAD files are installed by the command
153$codei%
154        make install
155%$$
156For example,
157if $icode cppad_prefix$$ is $code /usr$$,
158$icode cmake_install_includedirs$$ is $code include$$, and
159$icode cppad_postfix$$ is not specified,
160the file $code cppad.hpp$$ is installed in the location
161$codei%
162        /usr/include/cppad/cppad.hpp
163%$$
164The default value for $icode cppad_prefix$$ is $code /usr$$.
165
166$head cppad_postfix$$
167This is the bottom level relative path below which
168all of the CppAD files are installed.
169For example,
170if $icode cppad_prefix$$ is $code /usr$$,
171$icode cmake_install_includedirs$$ is $code include$$, and
172$icode cppad_postfix$$ is $code coin$$,
173the file $code cppad.hpp$$ is installed in the location
174$codei%
175        /usr/include/coin/cppad/cppad.hpp
176%$$
177The default value for $icode cppad_postfix$$ is empty; i.e,
178there is no bottom level relative directory for the installed files.
179
180
181$head cmake_install_includedirs$$
182This is one directory, or a list of directories separated
183by spaces or by semi-colons.
184This first entry in the list is the middle level relative path below which
185the CppAD include files are installed.
186The entire list is used for searching for include files.
187For example,
188if $icode cppad_prefix$$ is $code /usr$$,
189$icode cmake_install_includedirs$$ is $code include$$, and
190$icode cppad_postfix$$ is not specified,
191the file $code cppad.hpp$$ is installed in the location
192$codei%
193        /usr/include/cppad/cppad.hpp
194%$$
195The default value for this directory list is $code include$$.
196
197
198$head cmake_install_libdirs$$
199This is one directory, or a list of directories separated
200by spaces or by semi-colons.
201This first entry in the list is the middle level relative path below which
202the CppAD library files are installed.
203The entire list is used for searching for library files.
204For example,
205if $icode cppad_prefix$$ is $code /usr$$,
206$icode cmake_install_libdirs$$ is $code lib$$,
207$icode cppad_postfix$$ is not specified,
208and $icode ipopt_prefix$$ is specified,
209the file $code libcppad_ipopt.a$$ is installed in the location
210$codei%
211        /usr/lib/libcppad_ipopt.a
212%$$
213The default value for this directory list is $code lib$$.
214
215$head cmake_install_datadir$$
216This is the middle level relative path below which
217the CppAD data files are installed.
218For example,
219if $icode cppad_prefix$$ is $code /usr$$,
220$icode cmake_install_datadir$$ is $code share$$, and
221$icode cppad_postfix$$ is not specified,
222the $cref pkgconfig$$ file $code cppad.pc$$ is installed in the location
223$codei%
224        /usr/share/pkgconfig/cppad.pc
225%$$
226The default value for $icode cmake_install_datadir$$ is $code share$$.
227
228$head cmake_install_docdir$$
229This is the middle level relative path below which
230the CppAD documentation files are installed.
231For example,
232if $icode cppad_prefix$$ is $code /usr$$,
233$icode cmake_install_docdir$$ is $code share/doc$$, and
234$icode cppad_postfix$$ is not specified,
235the file $code cppad.xml$$ is installed in the location
236$codei%
237        /usr/share/doc/cppad/cppad.xml
238%$$
239There is no default value for $icode cmake_install_docdir$$.
240If it is not specified, the documentation files are not installed.
241
242$head package_prefix$$
243Each of these packages corresponds to optional CppAD examples,
244that can be compiled and tested if the corresponding prefix is provided:
245$table
246$rref adolc_prefix$$
247$rref colpack_prefix$$
248$rref eigen_prefix$$
249$rref fadbad_prefix$$
250$rref ipopt_prefix$$
251$rref sacado_prefix$$
252$tend
253
254$head cppad_cxx_flags$$
255This specifies the addition compiler flags
256that are used when compiling the CppAD examples and tests.
257The default value for these flags is the empty string $code ""$$.
258These flags must be valid for the C++ compiler
259on your system.
260For example, if you are using $code g++$$ you could specify
261$codep
262        -D cppad_cxx_flags="-Wall -ansi -pedantic-errors -std=c++11 -Wshadow"
263$$
264$subhead C++11$$
265In order for the compiler to take advantage of features that are new in C++11,
266the $icode cppad_cxx_flags$$ must enable these features.
267The compiler may still be used with a flag that disables the new features
268(unless it is a Microsoft compiler; i.e., $code _MSC_VER$$ is defined).
269
270$subhead debug and release$$
271The CppAD examples and tests decide which files to compile for debugging
272and which to compile for release. Hence debug and release flags should
273not be included in $icode cppad_cxx_flags$$.
274See also the
275$cref/CPPAD_DEBUG_AND_RELEASE
276        /preprocessor
277        /Documented Here
278        /CPPAD_DEBUG_AND_RELEASE
279/$$
280compiler flag (which should not be included in $icode cppad_cxx_flags$$).
281
282$head cppad_profile_flag$$
283This specifies an addition compiler and link flag that is used
284for $cref/profiling/speed_main/package/profile/$$ the speed tests.
285A profile version of the speed test is only build when this argument
286is present.
287
288$subhead Eigen and Fadbad$$
289The packages
290$cref/eigen/eigen_prefix/$$ and $cref/fadbad/fadbad_prefix/$$
291currently generate a lot of shadowed variable warnings.
292If the $code -Wshadow$$ flag is present, it is automatically removed when
293compiling examples and test that use these packages.
294
295$head cppad_testvector$$
296See $tref cppad_testvector$$.
297
298$head cppad_max_num_threads$$
299The value $icode cppad_max_num_threads$$
300must be greater than or equal to four; i.e.,
301$icode%max_num_threads% >= 4%$$.
302The current default value for $icode cppad_max_num_threads$$ is 48,
303but it may change in future versions of CppAD.
304The value $icode cppad_max_num_threads$$ in turn specifies
305the default value for the preprocessor symbol
306$cref/CPPAD_MAX_NUM_THREADS/multi_thread/CPPAD_MAX_NUM_THREADS/$$.
307
308$head cppad_tape_id_type$$
309The type $icode cppad_tape_id_type$$
310is used for identifying different tapes.
311The valid values for this type are
312$code unsigned char$$,
313$code unsigned short int$$,
314$code unsigned int$$, and
315$code size_t$$.
316The smaller the value of $codei%sizeof(%cppad_tape_id_type%)%$$,
317the less memory is used.
318On the other hand, the value
319$codei%
320        std::numeric_limits<%cppad_tape_id_type%>::max()
321%$$
322must be larger than the maximum number of tapes used by one thread times
323$cref/CPPAD_MAX_NUM_THREADS/multi_thread/CPPAD_MAX_NUM_THREADS/$$.
324
325$subhead cstdint$$
326If all of the following $code cstdint$$ types are defined,
327they can also be used as the value of $icode cppad_tape_addr_type$$:
328$code uint8_t$$,
329$code uint16_t$$,
330$code uint32_t$$,
331$code uint64_t$$.
332
333$head cppad_tape_addr_type$$
334The type $icode cppad_tape_addr_type$$
335is used for address in the AD recordings (tapes).
336The valid values for this argument are
337$code unsigned char$$,
338$code unsigned short int$$,
339$code unsigned int$$,
340$code size_t$$.
341The smaller the value of $codei%sizeof(%cppad_tape_addr_type%)%$$,
342the less memory is used.
343On the other hand, the value
344$codei%
345        std::numeric_limits<%cppad_tape_addr_type%>::max()
346%$$
347must be larger than any of the following:
348$cref/size_op/seq_property/size_op/$$,
349$cref/size_op_arg/seq_property/size_op_arg/$$,
350$cref/size_par/seq_property/size_text/$$,
351$cref/size_par/seq_property/size_par/$$,
352$cref/size_par/seq_property/size_VecAD/$$.
353
354$subhead cstdint$$
355If all of the following $code cstdint$$ types are defined,
356they can also be used as the value of $icode cppad_tape_addr_type$$:
357$code uint8_t$$,
358$code uint16_t$$,
359$code uint32_t$$,
360$code uint64_t$$.
361
362$head cppad_debug_which$$
363All of the CppAD examples and test can optionally be tested
364in debug or release mode (see exception below).
365This option controls which mode is chosen for the corresponding files.
366The value $icode cppad_debug_which$$ be one of the following:
367$code debug_even$$, $code debug_odd$$, $code debug_all$$, $code debug_none$$.
368If it is $code debug_even$$ ($code debug_odd$$),
369files with an even (old) index in a list for each case will be compiled
370in debug mode. The remaining files will be compiled in release mode.
371If it is $code debug_all$$ ($code debug_none$$),
372all the files will be compiled in debug (release) mode.
373If $icode cppad_debug_which$$ does not appear on the command line,
374the default value $code debug_all$$ is used.
375
376$subhead Exception$$
377The test corresponding to $code make cppad_ipopt_speed$$
378always get complied in release more (to avoid the extra time
379it would take to run in debug mode).
380Note that this test corresponds a deprecated interface; see
381$cref cppad_ipopt_nlp$$.
382
383$head cppad_deprecated$$
384The default value for $icode cppad_deprecated$$ is $code NO$$
385(the value $code YES$$ is not currently being used).
386
387$children%
388        omh/install/adolc_prefix.omh%
389        omh/install/colpack_prefix.omh%
390        omh/install/eigen_prefix.omh%
391        omh/install/fadbad_prefix.omh%
392        omh/install/ipopt_prefix.omh%
393        omh/install/sacado_prefix.omh%
394        omh/install/testvector.omh
395%$$
396
397
398$end
Note: See TracBrowser for help on using the repository browser.