source: trunk/example/ipopt_solve/CMakeLists.txt @ 3116

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

Add option to use ColPack?, as well as CppAD, sparse coloring algorithm.

  • Property svn:keywords set to Id
File size: 1.7 KB
RevLine 
[2654]1# $Id: CMakeLists.txt 3116 2014-02-24 21:44:26Z bradbell $
2# -----------------------------------------------------------------------------
[3116]3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
[2654]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 example/ipopt_solve directory tests
13
14# Specifies build type for this directory. Possible values are
15# empty, Debug, Release, RelWithDebInfo and MinSizeRel
16SET(CMAKE_BUILD_TYPE DEBUG)
17
[2681]18# Local link directories to search, as determined by pkg-config for ipopt
[2654]19LINK_DIRECTORIES( ${ipopt_LIBRARY_DIRS} )
20
[3116]21# colpack_prefix
22IF ( colpack_prefix )
23        # Extra source files if we are including colpack
24        SET(colpack_sources ../../cppad/local/cppad_colpack.cpp)
25        # add colpack to list of libraries
26        SET(colpack_libs "ColPack")
27ELSE ( colpack_prefix )
28        SET(colpack_sources "")
29        SET(colpack_libs "")
30ENDIF ( colpack_prefix )
31
[2654]32#
33ADD_EXECUTABLE(example_ipopt_solve EXCLUDE_FROM_ALL
34        solve.cpp
35        get_started.cpp
[2656]36        ode_inverse.cpp
[2661]37        retape.cpp
[3116]38        ${colpack_sources}
[2654]39)
40
41# Extra compiler flags
42add_cppad_cxx_flags( example_ipopt_solve )
43
[2681]44# libraries to be linked into the specified target,
45# as determined by pkg-config for ipopt
[3116]46TARGET_LINK_LIBRARIES(example_ipopt_solve ${ipopt_LIBRARIES} ${colpack_libs})
[2654]47
48# Add the check_example_ipopt_solve target
49ADD_CUSTOM_TARGET(check_example_ipopt_solve
50        example_ipopt_solve
51        DEPENDS example_ipopt_solve
52)
Note: See TracBrowser for help on using the repository browser.