| 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 |
# SECTION 1: Project definition |
| 35 |
# |
| 36 |
|
| 37 |
import set ; |
| 38 |
import path ; |
| 39 |
|
| 40 |
local stk_ngp_test-root-inc ; |
| 41 |
if $(RTenv-arg) = "user" { |
| 42 |
stk_ngp_test-root-inc = $(stk_ngp_test-root)/include ; |
| 43 |
} else { |
| 44 |
stk_ngp_test-root-inc = $(stk_ngp_test-root) ; |
| 45 |
} |
| 46 |
|
| 47 |
project votd |
| 48 |
: requirements |
| 49 |
$(sierra-warnings) |
| 50 |
<define>STK_BUILT_FOR_SIERRA |
| 51 |
<define>STK_BUILT_WITH_BJAM |
| 52 |
<define>STK_SHOW_DEPRECATED_WARNINGS |
| 53 |
<define>STK_HIDE_DEPRECATED_CODE |
| 54 |
<define>SIERRA_MIGRATION |
| 55 |
<include>$(stk_ngp_test-root-inc) |
| 56 |
: usage-requirements |
| 57 |
<define>SIERRA_MIGRATION |
| 58 |
<include>$(stk_ngp_test-root-inc) |
| 59 |
: build-dir $(stk_ngp_test-builddir) |
| 60 |
; |
| 61 |
|
| 62 |
# This variable should contain the applications and associated files that |
| 63 |
# must be installed for both developers and end users. Unless they need to |
| 64 |
# be visible to end users, unittests should not be placed here. |
| 65 |
local installed-end-user-files = |
| 66 |
; |
| 67 |
# |
| 68 |
# This variable should contain the applications and associated files that will |
| 69 |
# only be installed for and visible to developers. |
| 70 |
# Note that if the --install-developer-files option is passed to bjam these will also |
| 71 |
# be installed for end-users. (This is only intended to be used for testing.) |
| 72 |
local installed-developer-files = |
| 73 |
stk_ngp_test_utest |
| 74 |
; |
| 75 |
|
| 76 |
# |
| 77 |
# SECTION 2: Development install |
| 78 |
# |
| 79 |
|
| 80 |
local xml-files = |
| 81 |
; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
# Dependencies listed in this target are installed in the developer's project. |
| 87 |
# This should include all executables and any other files needed for developer use. |
| 88 |
explicit install-targets ; |
| 89 |
alias install-targets |
| 90 |
: $(installed-end-user-files) |
| 91 |
$(installed-developer-files) |
| 92 |
; |
| 93 |
|
| 94 |
# |
| 95 |
# SECTION 3: End-user install |
| 96 |
# |
| 97 |
explicit install-user-env ; |
| 98 |
alias install-user-env : install-user-jamfile |
| 99 |
install-user-include |
| 100 |
install-user-lib |
| 101 |
install-user-bin ; |
| 102 |
|
| 103 |
# Dependencies listed in this target are always installed for end users. |
| 104 |
# This should include only those executables and any other files needed by end-users. |
| 105 |
explicit install-user-bin ; |
| 106 |
install install-user-bin |
| 107 |
: $(installed-end-user-files) |
| 108 |
[ if-defined-val $(install-developer-files-arg) : |
| 109 |
# Targets listed here will only be installed if the --install-developer-files option |
| 110 |
# is passed to bjam. This is intended for testing that requires things like |
| 111 |
# unittests to be installed when they normally would not be. |
| 112 |
$(installed-developer-files) |
| 113 |
] |
| 114 |
: |
| 115 |
# Note that all Sierra executables are installed in a common bin directory, |
| 116 |
# not in a product-specific bin directory. |
| 117 |
<location>$(install-bin-dir) |
| 118 |
; |
| 119 |
|
| 120 |
# This rule copies build-system related files for this product to the install-root. |
| 121 |
explicit install-user-jamfile ; |
| 122 |
install install-user-jamfile |
| 123 |
: [ glob $(stk_ngp_test-root)/Jamfile ] |
| 124 |
: <location>$(install-root)/stk/stk_ngp_test |
| 125 |
<install-source-root>$(stk_ngp_test-root) |
| 126 |
; |
| 127 |
|
| 128 |
|
| 129 |
explicit install-user-include ; |
| 130 |
install install-user-include |
| 131 |
: [ path.glob-tree $(stk_ngp_test-root) : *.h *.hpp *.tcc ] |
| 132 |
: <location>$(install-root)/stk/stk_ngp_test/include <install-source-root>$(stk_ngp_test-root) |
| 133 |
; |
| 134 |
|
| 135 |
explicit install-user-lib ; |
| 136 |
install install-user-lib |
| 137 |
: stk_ngp_test |
| 138 |
: <location>$(install-root)/stk/stk_ngp_test/lib |
| 139 |
; |
| 140 |
|
| 141 |
explicit install-exe-targets ; |
| 142 |
alias install-exe-targets : ; |
| 143 |
|
| 144 |
# |
| 145 |
# SECTION 4: Build configuration |
| 146 |
# |
| 147 |
exe stk_ngp_test_utest |
| 148 |
: |
| 149 |
[ glob $(stk_ngp_test-root)/../stk_unit_tests/stk_ngp_test/*.cpp |
| 150 |
] |
| 151 |
stk_ngp_test |
| 152 |
stk_ngp_test_main |
| 153 |
: <tag>@sierra-exec-tag |
| 154 |
<include>$(stk_ngp_test-root)/../stk_unit_tests/stk_ngp_test |
| 155 |
; |
| 156 |
|
| 157 |
lib stk_ngp_test |
| 158 |
: |
| 159 |
[ ifdevbuild |
| 160 |
# Any parameters within this 'ifdevbuild' block apply to development |
| 161 |
# builds only and will not be present for user builds. |
| 162 |
[ glob $(stk_ngp_test-root)/stk_ngp_test/*.cpp ] |
| 163 |
] |
| 164 |
/tpl/googletest//gtest |
| 165 |
/tpl/trilinos//kokkoscore |
| 166 |
/mpi//mpi |
| 167 |
/sierra/stk_util//stk_util_ngp |
| 168 |
: |
| 169 |
[ ifuserbuild |
| 170 |
# Any parameters within this 'ifuserbuild' block apply to user |
| 171 |
# builds only and will not be present for developer builds. |
| 172 |
<file>$(stk_ngp_test-root)/lib/libstk_ngp_test.a |
| 173 |
] |
| 174 |
[ ifdevbuild |
| 175 |
# Any parameters within this 'ifdevbuild' block apply to development |
| 176 |
# builds only and will not be present for user builds. |
| 177 |
<toolset>nvidia,<gpu-arch>pascal:<cflags>--maxrregcount=96 |
| 178 |
<toolset>nvidia,<gpu-arch>volta:<cflags>--maxrregcount=160 |
| 179 |
<toolset>gcc:<cflags>"-Wextra -Wpedantic -Wshadow -Wno-unused-parameter" |
| 180 |
] |
| 181 |
; |
| 182 |
|
| 183 |
lib stk_ngp_test_main |
| 184 |
: |
| 185 |
[ ifdevbuild |
| 186 |
# Any parameters within this 'ifdevbuild' block apply to development |
| 187 |
# builds only and will not be present for user builds. |
| 188 |
[ glob $(stk_ngp_test-root)/stk_ngp_test/main/main.cpp ] |
| 189 |
] |
| 190 |
/tpl/googletest//gtest |
| 191 |
/tpl/trilinos//kokkoscore |
| 192 |
/mpi//mpi |
| 193 |
/sierra/stk_util//stk_util_ngp |
| 194 |
: |
| 195 |
[ ifuserbuild |
| 196 |
# Any parameters within this 'ifuserbuild' block apply to user |
| 197 |
# builds only and will not be present for developer builds. |
| 198 |
<file>$(stk_ngp_test-root)/lib/libstk_ngp_test_main.a |
| 199 |
] |
| 200 |
; |
| 201 |
|