| 1 |
#-------------------------------------------------------------------- |
| 2 |
# Copyright 2002 - 2008, 2010, 2011 National Technology & |
| 3 |
# Engineering Solutions of Sandia, LLC (NTESS). Under the terms |
| 4 |
# of Contract DE-NA0003525 with NTESS, there is a |
| 5 |
# non-exclusive license for use of this work by or on behalf |
| 6 |
# of the U.S. Government. Export of this program may require |
| 7 |
# a license from the United States Government. |
| 8 |
#-------------------------------------------------------------------- |
| 9 |
|
| 10 |
# |
| 11 |
# The signature for Boost.build rules is described here: |
| 12 |
# |
| 13 |
# http://www.boost.org/build/doc/html/bbv2/overview/targets.html |
| 14 |
# |
| 15 |
#function-name main-target-name |
| 16 |
# : sources |
| 17 |
# : requirements |
| 18 |
# : default-build |
| 19 |
# : usage-requirements |
| 20 |
# ; |
| 21 |
# |
| 22 |
# * "main-target-name" is the name used to request the target |
| 23 |
# on command line and to use it from other main targets. |
| 24 |
# Main target name may contain alphanumeric characters and symbols '-' and '_'; |
| 25 |
# * "sources" is the list of source files and other main targets that must be combined. |
| 26 |
# * "requirements" is the list of properties that must always be present |
| 27 |
# when this main target is built. |
| 28 |
# * "default-build" is the list of properties that will be used unless |
| 29 |
# some other value of the same feature is already specified. |
| 30 |
# * "usage-requirements" is the list of properties that will be propagated |
| 31 |
# to all main targets that use this one, i.e. to all dependedents. |
| 32 |
# |
| 33 |
# |
| 34 |
# |
| 35 |
# SECTION 1: Project definition |
| 36 |
# |
| 37 |
|
| 38 |
import set ; |
| 39 |
import path ; |
| 40 |
|
| 41 |
local stk_balance-root-inc ; |
| 42 |
if $(RTenv-arg) = "user" { |
| 43 |
stk_balance-root-inc = $(stk_balance-root)/include ; |
| 44 |
} else { |
| 45 |
stk_balance-root-inc = $(stk_balance-root) ; |
| 46 |
} |
| 47 |
|
| 48 |
project votd |
| 49 |
: requirements |
| 50 |
$(sierra-warnings) |
| 51 |
<include>$(stk_balance-root-inc) |
| 52 |
: usage-requirements |
| 53 |
<include>$(stk_balance-root-inc) |
| 54 |
: build-dir $(stk_balance-builddir) |
| 55 |
; |
| 56 |
|
| 57 |
# This variable should contain the applications and associated files that |
| 58 |
# must be installed for both developers and end users. Unless they need to |
| 59 |
# be visible to end users, unittests should not be placed here. |
| 60 |
local installed-end-user-files = |
| 61 |
stk_balance |
| 62 |
stk_balance_m2n |
| 63 |
; |
| 64 |
# |
| 65 |
# This variable should contain the applications and associated files that will |
| 66 |
# only be installed for and visible to developers. |
| 67 |
# Note that if the --install-developer-files option is passed to bjam these will also |
| 68 |
# be installed for end-users. (This is only intended to be used for testing.) |
| 69 |
local installed-developer-files = |
| 70 |
stk_balance_unit_tester |
| 71 |
stk_balance_integration_tester |
| 72 |
stk_balance_doc_tester |
| 73 |
; |
| 74 |
|
| 75 |
# |
| 76 |
# SECTION 2: Development install |
| 77 |
# |
| 78 |
|
| 79 |
# Dependencies listed in this target are installed in the developer's project. |
| 80 |
# This should include all executables and any other files needed for developer use. |
| 81 |
explicit install-targets ; |
| 82 |
alias install-targets |
| 83 |
: $(installed-end-user-files) |
| 84 |
$(installed-developer-files) |
| 85 |
; |
| 86 |
|
| 87 |
# |
| 88 |
# SECTION 3: End-user install |
| 89 |
# |
| 90 |
explicit install-user-env ; |
| 91 |
alias install-user-env : install-user-jamfile |
| 92 |
install-user-bin |
| 93 |
install-user-include |
| 94 |
install-user-lib |
| 95 |
; |
| 96 |
|
| 97 |
# This rule copies build-system related files for this product to the install-root. |
| 98 |
explicit install-user-jamfile ; |
| 99 |
install install-user-jamfile |
| 100 |
: [ glob $(stk_balance-root)/Jamfile ] |
| 101 |
: <location>$(install-root)/stk/stk_balance |
| 102 |
<install-source-root>$(stk_balance-root) |
| 103 |
; |
| 104 |
|
| 105 |
|
| 106 |
explicit install-exe-targets ; |
| 107 |
alias install-exe-targets : ; |
| 108 |
|
| 109 |
# Dependencies listed in this target are always installed for end users. |
| 110 |
# This should include only those executables and any other files needed by end-users. |
| 111 |
explicit install-user-bin ; |
| 112 |
install install-user-bin |
| 113 |
: $(installed-end-user-files) |
| 114 |
[ if-defined-val $(install-developer-files-arg) : |
| 115 |
# Targets listed here will only be installed if the --install-developer-files option |
| 116 |
# is passed to bjam. This is intended for testing that requires things like |
| 117 |
# unittests to be installed when they normally would not be. |
| 118 |
$(installed-developer-files) |
| 119 |
] |
| 120 |
: |
| 121 |
# Note that all Sierra executables are installed in a common bin directory, |
| 122 |
# not in a product-specific bin directory. |
| 123 |
<location>$(install-bin-dir) |
| 124 |
; |
| 125 |
|
| 126 |
explicit install-user-include ; |
| 127 |
install install-user-include |
| 128 |
: [ path.glob-tree $(stk_balance-root)/stk_balance : *.h *.hpp *.H ] |
| 129 |
: <location>$(install-root)/stk/stk_balance/include/stk_balance <install-source-root>$(stk_balance-root)/stk_balance |
| 130 |
; |
| 131 |
|
| 132 |
explicit install-user-lib ; |
| 133 |
install install-user-lib |
| 134 |
: stk_balance_lib |
| 135 |
search_tolerance_algs |
| 136 |
: <location>$(install-root)/stk/stk_balance/lib |
| 137 |
; |
| 138 |
|
| 139 |
# This is currently a header-only library, so it must not use the lib rule. |
| 140 |
# http://www.boost.org/boost-build2/doc/html/bbv2/faq/header-only-libraries.html |
| 141 |
# If sources are added to this library change this target to use the lib rule instead. |
| 142 |
alias search_tolerance |
| 143 |
: # No sources defined for header-only libraries. |
| 144 |
: # No build requirements |
| 145 |
: # No default build |
| 146 |
: <include>$(stk_balance-root-inc)/stk_balance/search_tolerance |
| 147 |
; |
| 148 |
|
| 149 |
lib search_tolerance_algs |
| 150 |
: |
| 151 |
[ ifdevbuild |
| 152 |
[ glob $(stk_balance-root)/stk_balance/search_tolerance_algs/*.cpp |
| 153 |
] |
| 154 |
] |
| 155 |
search_tolerance |
| 156 |
/sierra/stk_mesh//stk_mesh_base |
| 157 |
: |
| 158 |
<include>$(stk_balance-root-inc)/stk_balance/search_tolerance_algs/ |
| 159 |
[ ifuserbuild <file>$(stk_balance-root)/lib/libsearch_tolerance_algs.a ] |
| 160 |
: |
| 161 |
: |
| 162 |
; |
| 163 |
|
| 164 |
lib stk_balance_lib |
| 165 |
: |
| 166 |
[ ifdevbuild |
| 167 |
[ glob |
| 168 |
$(stk_balance-root)/stk_balance/*.cpp |
| 169 |
$(stk_balance-root)/stk_balance/internal/*.cpp |
| 170 |
$(stk_balance-root)/stk_balance/mesh/*.cpp |
| 171 |
$(stk_balance-root)/stk_balance/io/*.cpp |
| 172 |
$(stk_balance-root)/stk_balance/setup/*.cpp |
| 173 |
] |
| 174 |
] |
| 175 |
search_tolerance |
| 176 |
search_tolerance_algs |
| 177 |
/sierra/stk_io//stk_io |
| 178 |
/sierra/stk_mesh//stk_mesh_base |
| 179 |
/tpl/trilinos//zoltan2 |
| 180 |
# /tpl/trilinos//teuchoscomm |
| 181 |
# /tpl/trilinos//tpetracore |
| 182 |
# /tpl/trilinos//zoltan |
| 183 |
/sierra/stk_tools//stk_transfer_utils_lib |
| 184 |
/sierra/stk_search//stk_search |
| 185 |
/sierra/stk_tools//stk_tools_lib |
| 186 |
/sierra/stk_util//stk_util_command_line |
| 187 |
/sierra/stk_math//stk_math |
| 188 |
/sierra/stk_topology//stk_topology |
| 189 |
: |
| 190 |
<include>$(stk_balance-root-inc)/stk_balance |
| 191 |
[ ifuserbuild <file>$(stk_balance-root)/lib/libstk_balance_lib.a |
| 192 |
] |
| 193 |
[ ifdevbuild |
| 194 |
# Any parameters within this 'ifdevbuild' block apply to development |
| 195 |
# builds only and will not be present for user builds. |
| 196 |
<toolset>gcc:<cflags>"-Wextra -Wpedantic -Wshadow -Wno-unused-parameter -Wno-implicit-fallthrough" |
| 197 |
] |
| 198 |
|
| 199 |
: |
| 200 |
: |
| 201 |
; |
| 202 |
|
| 203 |
# |
| 204 |
# SECTION 4: Build configuration |
| 205 |
# |
| 206 |
|
| 207 |
exe stk_balance_unit_tester |
| 208 |
: |
| 209 |
[ glob $(stk_balance-root)/../stk_unit_tests/stk_balance/*.cpp ] |
| 210 |
stk_balance_lib |
| 211 |
/sierra/stk_unit_test_utils//stk_unit_test_utils |
| 212 |
/sierra/stk_unit_test_utils//stk_mesh_fixtures |
| 213 |
/sierra/stk_unit_test_utils//stk_unit_main |
| 214 |
/tpl/trilinos//zoltan2 |
| 215 |
: |
| 216 |
<tag>@sierra-exec-tag |
| 217 |
; |
| 218 |
|
| 219 |
exe stk_balance_doc_tester |
| 220 |
: |
| 221 |
[ glob $(stk_balance-root)/../stk_doc_tests/stk_balance/*.cpp ] |
| 222 |
stk_balance_lib |
| 223 |
/sierra/stk_unit_test_utils//stk_unit_test_utils |
| 224 |
/sierra/stk_unit_test_utils//stk_unit_main |
| 225 |
: |
| 226 |
<tag>@sierra-exec-tag |
| 227 |
; |
| 228 |
|
| 229 |
exe stk_balance_integration_tester |
| 230 |
: |
| 231 |
[ |
| 232 |
glob $(stk_balance-root)/../stk_integration_tests/stk_balance/*.cpp |
| 233 |
$(stk_balance-root)/../stk_integration_tests/test_utils/*.cpp |
| 234 |
] |
| 235 |
stk_balance_lib |
| 236 |
/sierra/seacas//nemesis |
| 237 |
/sierra/stk_unit_test_utils//stk_unit_main |
| 238 |
: |
| 239 |
<include>$(stk_balance-root-inc)/../stk_integration_tests |
| 240 |
<tag>@sierra-exec-tag |
| 241 |
; |
| 242 |
|
| 243 |
exe stk_balance |
| 244 |
: |
| 245 |
[ glob |
| 246 |
$(stk_balance-root)/stk_balance/balance_main/*.cpp |
| 247 |
] |
| 248 |
stk_balance_lib |
| 249 |
/tpl/operating_system//pthread |
| 250 |
: |
| 251 |
<tag>@sierra-exec-tag |
| 252 |
; |
| 253 |
|
| 254 |
exe stk_balance_m2n |
| 255 |
: |
| 256 |
[ glob |
| 257 |
$(stk_balance-root)/stk_balance/m2n_main/*.cpp |
| 258 |
] |
| 259 |
stk_balance_lib |
| 260 |
/tpl/operating_system//pthread |
| 261 |
: |
| 262 |
<tag>@sierra-exec-tag |
| 263 |
; |
| 264 |
|