source: trunk/speed/sacado/CMakeLists.txt @ 3857

Last change on this file since 3857 was 3857, checked in by bradbell, 3 years ago

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

commit b6d8a65aa1e85f3ed123b07b67da04fd4067d788
Author: Brad Bell <bradbell@…>
Date: Fri Dec 23 05:45:01 2016 -0700

Move example to sub-directory (so can start work on true interface).

commit af0c690d8a59b24b69b297786c0ce78808592d54
Author: Brad Bell <bradbell@…>
Date: Fri Dec 23 04:46:33 2016 -0700

  1. Add documentation for available 'make check' commands.
  2. Advance version to cppad-20161223.

commit 45abd5f5a247a9a30d4fb7f1a3af759de06a1308
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 23:18:21 2016 -0700

Add an example template class.

commit b4fd2022cdb1fdf589014e78525d90ba9a1b88f5
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 22:17:17 2016 -0700

Add more const declarations to class functions.

commit 47d10820523738a8e16a61fd94d13d58f9f84b0d
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 17:49:05 2016 -0700

  1. Change my_class -> normal_class.
  2. Remove *.sh scripts that have been repalced by swig/CMakeLists.txt.

commit d2555cd4e77a47fc3c6e62534a07feea56e68f94
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 17:28:00 2016 -0700

Print out avaiable make check commands during camke command execution.

commit bf57a55c834caa754cc960a34050a0414997c6e2
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 16:46:32 2016 -0700

Move check depends determination for cppad_ipopt to sub-directories.

commit 58c299de29feaad5e01ef8fb5e1974476362549f
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 16:12:13 2016 -0700

Move check depends determination to subdirectories.

commit 537ea4d3401958a3616cb8c02e27b68e96a50392
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 14:07:22 2016 -0700

Move check depends to subdirectores for multi_thread, print_for, test_more.

commit 7526b243b4df8d1187b5fe1760771036d331f9a8
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 13:40:51 2016 -0700

Move check_depends for compare_c and introduction to subdirectories.
check_swig_example.m: remove addpath (copy to woring directory instead)
check_swig_example.py: remove path.append (copy to woring directory instead)

commit c7f51b1df882ee95d36b4cc1354dfe6d4726e942
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 08:47:57 2016 -0700

Move check_depends determination for examples to subdiectories.

commit c193255447a636c551652b3d88488a17c1951215
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 08:18:36 2016 -0700

  1. Add cmake commands for build of swig for both python and octave.
  2. Advance version to cppad-20161222.

commit 0da2d3ffdd4b21cf30aeff0d0545457d07d3d923
Author: Brad Bell <bradbell@…>
Date: Thu Dec 22 05:20:56 2016 -0700

Move example -> swig_example to avoid cmake naming conflicts with ../example

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# $Id: CMakeLists.txt 3857 2016-12-23 13:08:43Z 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 speed/sacado directory tests
13# Inherit build type from ../CMakeList.txt
14
15# assert sacado_prefix is defined
16IF ( NOT sacado_prefix )
17        MESSAGE(FATAL_ERROR
18                "speed/sacado/CMakeLists.txt: sacado_prefix = ${sacado_prefix}"
19        )
20ENDIF ( NOT sacado_prefix )
21
22# Adds flags to the compiler command line for sources in the current directory
23# and below. This command can be used to add any flags, but it was originally
24# intended to add preprocessor definitions.
25ADD_DEFINITIONS("-DCPPAD_SACADO_SPEED -DRAD_AUTO_AD_Const")
26
27# Local include directories to search (not in package_prefix/includdir)
28INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../src )
29
30# add_executable(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
31#                 source1 source2 ... sourceN
32# )
33ADD_EXECUTABLE(speed_sacado EXCLUDE_FROM_ALL ../main.cpp
34        det_lu.cpp
35        det_minor.cpp
36        mat_mul.cpp
37        ode.cpp
38        poly.cpp
39        sparse_hessian.cpp
40        sparse_jacobian.cpp
41)
42
43# Compiler flags for cppad source
44add_cppad_cxx_flags( speed_sacado )
45
46# Find name used for teuchos library
47SET(teuchos_lib NOTFOUND)
48FOREACH(dir ${cmake_install_libdirs})
49        FILE(GLOB file_list ${sacado_prefix}/${dir}/libteuchoscore.*)
50        IF(file_list)
51                SET(teuchos_lib teuchoscore)
52        ENDIF(file_list)
53        FILE(GLOB file_list ${sacado_prefix}/${dir}/libteuchos.*)
54        IF(file_list)
55                SET(teuchos_lib teuchos)
56        ENDIF(file_list)
57ENDFOREACH(dir)
58
59# List of libraries to be linked into the specified target
60IF(teuchos_lib)
61        TARGET_LINK_LIBRARIES(speed_sacado speed_src sacado ${teuchos_lib})
62ELSE(teuchos_lib)
63        MESSAGE(FATAT_ERROR
64"
65For all dir in cmake_install_libdirs, cannot find either
66        sacado_prefix/dir/teuchos
67        sacado_prefix/dir/teuchoscore
68where
69        sacado_prefix = ${sacado_prefix}
70        cmake_install_libdirs = ${cmake_install_libdirs}
71        teuchos_lib= ${teuchos_lib}
72"
73        )
74ENDIF(teuchos_lib)
75#
76# Add the check_speed_sacado target
77ADD_CUSTOM_TARGET(check_speed_sacado
78        speed_sacado correct 54321
79        DEPENDS speed_sacado speed_src
80)
81MESSAGE(STATUS "make check_speed_sacado: available")
82
83# Change check depends in parent environment
84add_to_list(check_speed_depends check_speed_sacado)
85SET(check_speed_depends "${check_speed_depends}" PARENT_SCOPE)
Note: See TracBrowser for help on using the repository browser.