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

Last change on this file since 3122 was 3122, checked in by bradbell, 6 years ago

Control build type for all speed tests together (becasue libarary must agree).

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1# $Id: CMakeLists.txt 3122 2014-02-26 03:23:19Z 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# List of libraries to be linked into the specified target
48TARGET_LINK_LIBRARIES(speed_sacado speed_src sacado teuchos)
49
50# Add the check_speed_sacado target
51ADD_CUSTOM_TARGET(check_speed_sacado
52        speed_sacado correct 54321
53        DEPENDS speed_sacado speed_src
54)
Note: See TracBrowser for help on using the repository browser.