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

Last change on this file since 3320 was 3320, checked in by bradbell, 6 years ago
  1. g++ 4.8.2 has shadow warnings by default, but eigen and fadbad do not

these warnings, so supress then in these cases.

  1. Move check that arguments come before result into on place,

CPPAD_ASSERT_ARG_BEFORE_RESULT (only one argument case so far).

main.cpp: fix shadowing of index variable.
CMakeLists.txt: adapt to change in teuchos library name.
sparse_jacobian.cpp: fix a shadowed variable.
check_svn_id.sh: ignore svn_commit.sh.
gpl_license.sh: ignore svn_commit.sh.

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