1 | ##############################################################################
|
---|
2 | #
|
---|
3 | # Template CMake Configuration File.
|
---|
4 | #
|
---|
5 | ##############################################################################
|
---|
6 | # The following CMake variables represent the minimum set of variables
|
---|
7 | # that are required to allow Dakota to
|
---|
8 | # * find all prerequisite third party libraries (TPLs)
|
---|
9 | # * configure compiler and MPI options
|
---|
10 | # * set Dakota install path
|
---|
11 | #
|
---|
12 | # Instructions:
|
---|
13 | # 1. Read Dakota/INSTALL - Source Quick Start to use this template file.
|
---|
14 | #
|
---|
15 | # 2. Uncomment CMake variables below ONLY for values you need to change for
|
---|
16 | # your platform. Edit variables as needed.
|
---|
17 | #
|
---|
18 | # For example, if you are using a custom install of Boost, installed in
|
---|
19 | # /home/me/usr/boost, uncomment both CMake Boost variables and edit
|
---|
20 | # paths:
|
---|
21 | # set(BOOST_ROOT
|
---|
22 | # "/home/me/usr/boost"
|
---|
23 | # CACHE PATH "Use non-standard Boost install" FORCE)
|
---|
24 | # set( Boost_NO_SYSTEM_PATHS TRUE
|
---|
25 | # CACHE BOOL "Supress search paths other than BOOST_ROOT" FORCE)
|
---|
26 | #
|
---|
27 | # Save file and exit.
|
---|
28 | #
|
---|
29 | # 6. Run CMake with script file. At terminal window, type:
|
---|
30 | # $ cmake -C BuildCustom.cmake $DAK_SRC
|
---|
31 | #
|
---|
32 | # If you have not followed instructions in INSTALL -Source Quick Start,
|
---|
33 | # you will need to replace BuildCustom.cmake with the actual filename of
|
---|
34 | # this file and $DAK_SRC with the actual path to Dakota source.
|
---|
35 | #
|
---|
36 | ##############################################################################
|
---|
37 |
|
---|
38 | ##############################################################################
|
---|
39 | # Set BLAS, LAPACK library paths ONLY if in non-standard locations
|
---|
40 | ##############################################################################
|
---|
41 | set( BLAS_LIBS
|
---|
42 | "$ENV{BLAS_LIBS}"
|
---|
43 | CACHE FILEPATH "Use non-standard BLAS library path" FORCE )
|
---|
44 | set( LAPACK_LIBS
|
---|
45 | "$ENV{LAPACK_LIBS}"
|
---|
46 | CACHE FILEPATH "Use non-standard BLAS library path" FORCE )
|
---|
47 |
|
---|
48 | ##############################################################################
|
---|
49 | # Set additional compiler options
|
---|
50 | # Uncomment and replace <flag> with actual compiler flag, e.g. -xxe4.2
|
---|
51 | ##############################################################################
|
---|
52 | set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS}"
|
---|
53 | CACHE STRING "C Flags my platform" )
|
---|
54 | set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"
|
---|
55 | CACHE STRING "CXX Flags for my platform" )
|
---|
56 | set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}"
|
---|
57 | CACHE STRING "Fortran Flags for my platform" )
|
---|
58 |
|
---|
59 | ##############################################################################
|
---|
60 | # Set MPI options
|
---|
61 | # Recommended practice is to set DAKOTA_HAVE_MPI and set MPI_CXX_COMPILER
|
---|
62 | # to a compiler wrapper.
|
---|
63 | ##############################################################################
|
---|
64 | set( DAKOTA_HAVE_MPI ON
|
---|
65 | CACHE BOOL "Build with MPI enabled" FORCE)
|
---|
66 | set( MPI_INCLUDE_PATH "$ENV{MPI_HOME}/include"
|
---|
67 | CACHE FILEPATH "Use MPI headers" FORCE)
|
---|
68 | set( MPI_LIBRARY "$ENV{MPI_HOME}/lib/libmpi.a"
|
---|
69 | CACHE FILEPATH "Use MPI library" FORCE)
|
---|
70 |
|
---|
71 | ##############################################################################
|
---|
72 | # Set Boost path if CMake cannot find your installed version of Boost or
|
---|
73 | # if you have a custom Boost install location.
|
---|
74 | ##############################################################################
|
---|
75 | set(BOOST_ROOT
|
---|
76 | $ENV{BOOST_ROOT}
|
---|
77 | CACHE PATH "Use non-standard Boost install" FORCE)
|
---|
78 | set( Boost_NO_SYSTEM_PATHS TRUE
|
---|
79 | CACHE BOOL "Supress search paths other than BOOST_ROOT" FORCE)
|
---|
80 |
|
---|
81 | ##############################################################################
|
---|
82 | # Set Trilinos path if you want have a custom Trilinos install location. If
|
---|
83 | # not set, the Trilinos package, teuchos, will be build during the Dakota
|
---|
84 | # build.
|
---|
85 | ##############################################################################
|
---|
86 | #set( Trilinos_DIR
|
---|
87 | # "path/to/Trilinos/install"
|
---|
88 | # CACHE PATH "Path to installed Trilinos" FORCE )
|
---|
89 |
|
---|
90 | ##############################################################################
|
---|
91 | # Customize DAKOTA
|
---|
92 | ##############################################################################
|
---|
93 | set( CMAKE_INSTALL_PREFIX
|
---|
94 | $ENV{DAK_INSTALL}
|
---|
95 | CACHE PATH "Path to Dakota installation" )
|
---|