Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4db549061 | ||
|
|
4debd96adc | ||
|
|
30a4a95b7e | ||
|
|
a38aa58c0e | ||
|
|
e126a20df7 | ||
|
|
52cf2ee418 | ||
|
|
83a1e7e74b | ||
|
|
6069b7cfc0 | ||
|
|
41cc6d78db | ||
|
|
8561a817ea | ||
|
|
cfaf643d0e | ||
|
|
c505c4ca5f | ||
|
|
318f0e488e | ||
|
|
b22c9b7c84 | ||
|
|
bd491d025e | ||
|
|
6140c72aa6 | ||
|
|
7fcdc3f71c | ||
|
|
22feb208c2 | ||
|
|
ab65bbad4b | ||
|
|
64c66949e7 | ||
|
|
2fe18079a3 | ||
|
|
e0a66c7bc6 | ||
|
|
e4e5088ed6 | ||
|
|
aea281dcad | ||
|
|
b5aba16147 | ||
|
|
4ba1678561 | ||
|
|
8417f8eb04 | ||
|
|
55029e388f | ||
|
|
89c033bda9 | ||
|
|
0b57ae6b03 | ||
|
|
6588caafa6 | ||
|
|
b11fb97626 | ||
|
|
7a885c68b6 | ||
|
|
32278d3f77 | ||
|
|
c8dd33f5a3 | ||
|
|
1a7670600c | ||
|
|
a6ff40b0b2 | ||
|
|
54cf8b209c | ||
|
|
2e941e612f | ||
|
|
051f2bfe2f | ||
|
|
f13463e6b6 | ||
|
|
cd2fa1650d | ||
|
|
c23da3df34 | ||
|
|
95c1408d27 | ||
|
|
e278f4c24a | ||
|
|
365f2c4b2b | ||
|
|
ac59af9bd1 | ||
|
|
9d5d6203b9 | ||
|
|
1a66a2b8dd | ||
|
|
3b97ecef47 | ||
|
|
ed5b5a2a0c | ||
|
|
37cbab5bad | ||
|
|
11127b72b5 | ||
|
|
d5d87f1e64 | ||
|
|
fa6f228b87 | ||
|
|
21f1a2f47e | ||
|
|
5be7c6bd4e | ||
|
|
9f8e92ce93 | ||
|
|
4bbaca7fe5 | ||
|
|
cf1b4ef3e6 | ||
|
|
c3e36affa8 | ||
|
|
e9a614ba53 | ||
|
|
d57a462462 | ||
|
|
ac114aded4 | ||
|
|
74fc27de12 | ||
|
|
826b6767c9 | ||
|
|
89d5db2b5c | ||
|
|
1dd33050da | ||
|
|
0879638dda | ||
|
|
8a7b9b96ba | ||
|
|
23ea0644f8 | ||
|
|
bd6d856b0e | ||
|
|
6424177e3a | ||
|
|
0b92d2b03b | ||
|
|
bf04610296 | ||
|
|
ff9560f401 | ||
|
|
e0d6a21438 | ||
|
|
da794de6fd | ||
|
|
a1e941c43b | ||
|
|
3bb41960fd | ||
|
|
95fa78d3fd | ||
|
|
eff3dede3a | ||
|
|
7b4c7cffd7 | ||
|
|
8281721bde | ||
|
|
2ece55aa97 | ||
|
|
88c471a315 | ||
|
|
11afddc8da | ||
|
|
f7cac87979 | ||
|
|
5401e8417b | ||
|
|
c61a85e217 | ||
|
|
08cda36387 | ||
|
|
caa8a2d252 | ||
|
|
21eac9d921 | ||
|
|
d75384da6d | ||
|
|
008907161d | ||
|
|
102430c835 | ||
|
|
ce0e6e1d4f | ||
|
|
8c6ffdd911 | ||
|
|
a5a8f9d745 | ||
|
|
1c715483b4 | ||
|
|
08706b7cba | ||
|
|
c1045f2c28 | ||
|
|
46d451ce74 | ||
|
|
1c57fc61d8 | ||
|
|
e56851056d | ||
|
|
28399fefc8 | ||
|
|
7f2e83794e | ||
|
|
1f73b075c9 | ||
|
|
b4026fd169 | ||
|
|
efeb577933 | ||
|
|
fdd8ff04a3 | ||
|
|
89cc2374c7 | ||
|
|
5fc4ee50f6 | ||
|
|
d8a9993f63 | ||
|
|
96fe1eff44 | ||
|
|
033dae3772 | ||
|
|
5efe15a79e | ||
|
|
3d00dbcd55 | ||
|
|
10b72648a8 | ||
|
|
e5dd190874 | ||
|
|
880b44620a | ||
|
|
0a55421f34 | ||
|
|
b7a87285a1 | ||
|
|
b0d8cb82a2 | ||
|
|
9cfca9397b | ||
|
|
a056e181c2 | ||
|
|
d8000dfc2c | ||
|
|
8feaff41fe | ||
|
|
97d5337283 | ||
|
|
87913529e1 | ||
|
|
4e96ab13dd | ||
|
|
2e1c0a95c2 | ||
|
|
096fab8da7 | ||
|
|
aeba1f2db4 | ||
|
|
7e34ce27c7 | ||
|
|
8589d4dd7b | ||
|
|
20bcc714b9 | ||
|
|
a1dc6d7c87 | ||
|
|
e493510d81 | ||
|
|
9b3f15b170 | ||
|
|
8c52d48965 | ||
|
|
9b33a7af3b | ||
|
|
2a186f8bc4 | ||
|
|
2ab1c5e322 | ||
|
|
7366046f47 | ||
|
|
1773995dbc | ||
|
|
2bdd9b567a | ||
|
|
9ee6b08f76 | ||
|
|
77df61003c | ||
|
|
701dcab948 | ||
|
|
97a4ac8338 | ||
|
|
c2b1d86c69 | ||
|
|
0392aea57e | ||
|
|
89207ef83a | ||
|
|
d34c3f584c | ||
|
|
72d530702e | ||
|
|
bf185d1245 | ||
|
|
58a25f1bea | ||
|
|
b816c21b19 | ||
|
|
c476b4727d | ||
|
|
f7fccf6a3a | ||
|
|
72acb7caf1 | ||
|
|
40223e513b | ||
|
|
e71dfec941 | ||
|
|
0e4a7e6f90 | ||
|
|
7baa2937b0 | ||
|
|
c79e4a7a4b | ||
|
|
7f40f3687c | ||
|
|
4c7c3922ea | ||
|
|
6814224f0e | ||
|
|
0b8ddec6d9 | ||
|
|
5c43516282 | ||
|
|
450a9e37cf | ||
|
|
7e2bcbb122 | ||
|
|
535b560b0d | ||
|
|
eb35c6185a | ||
|
|
4faeda1234 | ||
|
|
15e0273eec | ||
|
|
5b775c7fc7 | ||
|
|
e7ca0926c9 | ||
|
|
a33abee2ad | ||
|
|
9d42d4a6f7 | ||
|
|
81dacc2e3b | ||
|
|
1e84fc03ce | ||
|
|
5ec96f37a7 | ||
|
|
748b895e05 | ||
|
|
1ff9aec2f1 | ||
|
|
47ddafda31 | ||
|
|
0fedeb4212 | ||
|
|
95def2d57b | ||
|
|
41f645902f | ||
|
|
2120647911 | ||
|
|
75d06a6c94 | ||
|
|
ac544e8c9c | ||
|
|
6b6637e271 | ||
|
|
0f44f46973 | ||
|
|
bf02d4a98b | ||
|
|
03a31f506e | ||
|
|
1d9eec69ab | ||
|
|
e26a597e3f | ||
|
|
bee949cd3b | ||
|
|
0d1d2de350 | ||
|
|
54727f9dee | ||
|
|
1d7362b331 | ||
|
|
7b2cdacdea | ||
|
|
ea550aa5c8 | ||
|
|
4f169d8b38 | ||
|
|
8682211d0b | ||
|
|
15c81df232 | ||
|
|
8f9206ab46 | ||
|
|
3f87e75821 | ||
|
|
f471ab5e0c | ||
|
|
22105d2982 | ||
|
|
879545c359 | ||
|
|
1b05f9a6a0 | ||
|
|
cb3bdb4b4e | ||
|
|
692c9b4498 | ||
|
|
e901657f81 | ||
|
|
881c704d11 | ||
|
|
df18d97283 | ||
|
|
30d2a4a089 | ||
|
|
06c9d0d1c7 | ||
|
|
d4f54bc76a | ||
|
|
92a6055ab9 | ||
|
|
e3f40d764e | ||
|
|
79cc3a3268 | ||
|
|
0406e48cef | ||
|
|
4bfdefdba5 | ||
|
|
cd0fa5d7d7 | ||
|
|
2f3c21ff7c | ||
|
|
27cc863108 | ||
|
|
d6ec4b828f | ||
|
|
98e3aca1c9 | ||
|
|
b0ed183b90 | ||
|
|
cfc679ad8b | ||
|
|
b9ca59ea61 | ||
|
|
135b087017 | ||
|
|
7f8a1a1702 | ||
|
|
d755edf4f4 | ||
|
|
0c0e6d4b42 | ||
|
|
bc5b969a59 | ||
|
|
ae2edaceb8 | ||
|
|
35c9ae7e22 | ||
|
|
908000e595 | ||
|
|
11ba289f5f | ||
|
|
9f91311c78 | ||
|
|
1435e3a202 | ||
|
|
f2d0668c93 | ||
|
|
7f2c3a6c0e | ||
|
|
0a97b2a96e | ||
|
|
f94bb6df40 | ||
|
|
1e77b38d23 | ||
|
|
6882703746 | ||
|
|
444261a11e | ||
|
|
4292cc9974 | ||
|
|
ab7107cf23 | ||
|
|
eccd335d78 | ||
|
|
8dafa41262 | ||
|
|
58ca5c2f8d | ||
|
|
e9d0dc3ec4 | ||
|
|
7d6310d17c | ||
|
|
8727d61ec1 | ||
|
|
63026c7279 | ||
|
|
c32c1ed799 | ||
|
|
96249d0258 | ||
|
|
0ceb805deb | ||
|
|
f76ea6220a | ||
|
|
b49f4d4819 | ||
|
|
1c10440bdf | ||
|
|
975e350cd3 | ||
|
|
2599a88b1d | ||
|
|
7c60b5949a | ||
|
|
9d070999b6 | ||
|
|
27d3bbbaf9 | ||
|
|
8c6606ce3b | ||
|
|
6669fa5942 | ||
|
|
feafbf1472 | ||
|
|
fe08e6c04c | ||
|
|
cbd1915658 | ||
|
|
5c95eceac8 | ||
|
|
e5f26c0977 | ||
|
|
5cd6b3ec3c | ||
|
|
64ccf25d4a | ||
|
|
536c2d3ef6 | ||
|
|
73d8f53a95 | ||
|
|
f9c6e6714d | ||
|
|
627c406d8a | ||
|
|
f7c8a0bb7b | ||
|
|
04d331e439 | ||
|
|
1e7d8f0ba8 | ||
|
|
79c1a20ed3 | ||
|
|
7fe87d1daa | ||
|
|
ac3eb59173 | ||
|
|
9d8aaabb6d | ||
|
|
b0d3eef7a9 | ||
|
|
14bd942f1b | ||
|
|
1a122a6606 | ||
|
|
dce27cd024 | ||
|
|
d311f3ef82 | ||
|
|
abd5ffbf9d | ||
|
|
315d91ab92 | ||
|
|
04df5730f4 | ||
|
|
2bb303f705 | ||
|
|
5b32bd1a48 | ||
|
|
3104c85457 | ||
|
|
fc3d17acba | ||
|
|
c9f4dc98af | ||
|
|
d236f480e6 | ||
|
|
962cc73639 | ||
|
|
6f024bd13a | ||
|
|
2f26e9ddf3 | ||
|
|
d2f74c6edd | ||
|
|
c361228791 | ||
|
|
0af46f8b2e | ||
|
|
7e5d44f313 | ||
|
|
6a50ea0c91 | ||
|
|
68fbb9b5fe | ||
|
|
f791a3deef | ||
|
|
ff3220753a | ||
|
|
ea3f571ee0 | ||
|
|
376be8e2f4 | ||
|
|
4b1f7b7b23 | ||
|
|
8f911b47cf | ||
|
|
b8ee545347 | ||
|
|
82292a52b9 | ||
|
|
06ce3d0635 | ||
|
|
8b1098f3a1 | ||
|
|
c7d77d8508 | ||
|
|
308f289822 | ||
|
|
c3cd439335 | ||
|
|
79c3ba4159 | ||
|
|
c3e2101f19 | ||
|
|
8fa602d270 | ||
|
|
8ff28a0e06 | ||
|
|
4c3f28e10e | ||
|
|
d988291851 | ||
|
|
f0b28094a8 | ||
|
|
2571c5d878 | ||
|
|
5bc4160a6c | ||
|
|
e0fb636086 | ||
|
|
ab3712811c | ||
|
|
441c783b76 | ||
|
|
00e56afe8a | ||
|
|
27152ad3eb | ||
|
|
a9b1f07c0e | ||
|
|
5e848fb761 | ||
|
|
0411a71ec7 | ||
|
|
3e7ee0241f | ||
|
|
3aae741b09 | ||
|
|
304f172376 | ||
|
|
58c9d166c0 | ||
|
|
6a303aa2bc | ||
|
|
a3d8ebfbb6 | ||
|
|
17a17191df | ||
|
|
925a36e46e | ||
|
|
3f5dae3f07 | ||
|
|
d56d03e0c5 | ||
|
|
0f46d8d0e2 | ||
|
|
8a47b386e7 | ||
|
|
d09912a42b | ||
|
|
47381363b7 | ||
|
|
acf6b29059 | ||
|
|
ace9c64ab9 | ||
|
|
4288d5747e | ||
|
|
ff599d134d | ||
|
|
3b57df4e33 | ||
|
|
71eb599211 | ||
|
|
6226bee166 | ||
|
|
9a85e6fe4d | ||
|
|
a977bd7fe8 | ||
|
|
f99ab09096 | ||
|
|
9929b39294 | ||
|
|
9fdaf2cb1f | ||
|
|
e254b50ff7 | ||
|
|
708a99307c | ||
|
|
8bc15b2dd4 | ||
|
|
85694d0b32 | ||
|
|
b205b1905a | ||
|
|
8be28e2c5b | ||
|
|
5aefa56d6c | ||
|
|
b1c9fdf678 | ||
|
|
3330f0a436 | ||
|
|
5f69390515 | ||
|
|
d1ff4e5748 | ||
|
|
164e834473 | ||
|
|
440d8a9083 | ||
|
|
8baad933c3 |
+3
-2
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
Language: Cpp
|
||||
BasedOnStyle: WebKit
|
||||
@@ -84,6 +84,7 @@ IncludeCategories:
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IndentCaseLabels: false
|
||||
IndentExternBlock: NoIndent
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
@@ -128,7 +129,7 @@ SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
Standard: c++14
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# Start using clang-format on OSL code base (#1215)
|
||||
630b4c042d696c94ec9b2a1b6f5adc250bd61e05
|
||||
|
||||
# More clang-format (#1218)
|
||||
bdb473cbdb119f3d9060d48f75f965cbd45f6d7a
|
||||
|
||||
# More clang-format: liboslquery, oslinfo, oslc, osl.imageio, osltoy (#1220)
|
||||
bf366d7a90c46599b82071dac6dbef7c5e3ca157
|
||||
|
||||
# Turn on clang-format for cpp files in testsuite (#1269)
|
||||
00c895fc642eb89685797c292048bdff15d675e7
|
||||
5e848fb761261521a3ee7cd8a4f6814f32fe4a47
|
||||
|
||||
# CI: Change our clang-format standard to clang11 (#1372)
|
||||
91d22ebe2f65d4ed0599e421172a15d99fe0e1b4
|
||||
|
||||
# More clang-format (this time, testrender and liboslnoise) (#1511)
|
||||
08706b7cbac781b6a9389780428016be985d9d89
|
||||
|
||||
# clang-format #1509
|
||||
b4026fd1695c08532557b3ba1c2142323087ccf9
|
||||
1f73b075c99861afa42fac44567b37f797bc72f2
|
||||
7f2e83794e6fa63d5180653cffb77be2cc38b32b
|
||||
28399fefc890442b5ac020e7a90cee0d5bf9f03c
|
||||
e56851056d33233b0bb8324faac251907099961a
|
||||
1c57fc61d8ab7c3f309be4335e4c71c26399edd4
|
||||
46d451ce74d00e904874df476ebeca19bb119ea9
|
||||
c1045f2c2845a98e661c7181932a031eb3c76063
|
||||
|
||||
# More clang-format (#1512)
|
||||
8c6ffdd911b9eb7db4adf41ab88891360452d7c5
|
||||
|
||||
# style: more clang-format (#1515)
|
||||
102430c83554fe7e328cd8c3317db00507bcfaba
|
||||
|
||||
# Revert some formatting (#1518)
|
||||
21eac9d9215d071b0a7b9ce2c32f189ed0c62c4a
|
||||
|
||||
# Another round of clang-format (#1540)
|
||||
38015b6be28643254aea530154b7860136cf5e15
|
||||
89d5db2b5c5fda79184d8245d903e580fc6a4e9c
|
||||
|
||||
# clang-format: the very last piece of the puzzle (#1555)
|
||||
4ee62cd2ef05543f818f4d95a19efc1d684a7381
|
||||
5be7c6bd4e7bd2e560cb6be8c06f11985384a87a
|
||||
@@ -0,0 +1,132 @@
|
||||
# Copyright 2008-present Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
name: Analysis
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run nightly while we're still working our way through the warnings
|
||||
- cron: "0 8 * * *"
|
||||
# Run unconditionally once weekly
|
||||
# - cron: "0 0 * * 0"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- '*analysis*'
|
||||
# Allow manual kicking off of the workflow from github.com
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
aswf:
|
||||
name: "SonarCloud Analysis"
|
||||
if: |
|
||||
github.repository == 'AcademySoftwareFoundation/OpenShadingLanguage'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- desc: sonar gcc9/C++14 llvm13 py3.9 boost1.76 exr3.1 oiio2.3 avx2
|
||||
nametag: static-analysis-sonar
|
||||
os: ubuntu-20.04-8c-32g-300h
|
||||
# os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang13
|
||||
cxx_std: 14
|
||||
openimageio_ver: master
|
||||
python_ver: 3.9
|
||||
pybind11_ver: v2.9.0
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2,b16_AVX512
|
||||
coverage: 1
|
||||
# skip_tests: 1
|
||||
sonar: 1
|
||||
setenvs: export SONAR_SCANNER_VERSION=4.7.0.2747
|
||||
SONAR_SERVER_URL="https://sonarcloud.io"
|
||||
BUILD_WRAPPER_OUT_DIR=bw_output
|
||||
OSL_CMAKE_BUILD_WRAPPER="build-wrapper-linux-x86-64 --out-dir bw_output"
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
CMAKE_UNITY_BUILD=OFF
|
||||
CODECOV=1
|
||||
TESTRENDER_AA=1
|
||||
OSL_TESTSUITE_SKIP_DIFF=1
|
||||
CTEST_TEST_TIMEOUT=1200
|
||||
OSL_CMAKE_FLAGS="-DOSL_TEST_BIG_TIMEOUT=1200 -DUSE_QT=0"
|
||||
CTEST_EXCLUSIONS="broken|noise-reg.regress|noise-gabor-reg.regress"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
container:
|
||||
image: aswf/ci-osl:${{matrix.vfxyear}}${{matrix.vfxsuffix}}
|
||||
env:
|
||||
CXX: ${{matrix.cxx_compiler}}
|
||||
CC: ${{matrix.cc_compiler}}
|
||||
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
|
||||
FMT_VERSION: ${{matrix.fmt_ver}}
|
||||
OPENEXR_VERSION: ${{matrix.openexr_ver}}
|
||||
OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
|
||||
PYBIND11_VERSION: ${{matrix.pybind11_ver}}
|
||||
PYTHON_VERSION: ${{matrix.python_ver}}
|
||||
USE_BATCHED: ${{matrix.batched}}
|
||||
USE_SIMD: ${{matrix.simd}}
|
||||
PARALLEL: 24
|
||||
# DEBUG_CI: 1
|
||||
steps:
|
||||
# We would like to use harden-runner, but it flags too many false
|
||||
# positives, every time we download a dependency. We should use it only
|
||||
# on CI runs where we are producing artifacts that users might rely on.
|
||||
# - name: Harden Runner
|
||||
# uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
|
||||
# with:
|
||||
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_keys
|
||||
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
|
||||
- name: ccache
|
||||
id: ccache
|
||||
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
|
||||
restore-keys: ${{github.job}}-
|
||||
- name: Build setup
|
||||
run: |
|
||||
${{matrix.setenvs}}
|
||||
src/build-scripts/ci-startup.bash
|
||||
- name: Remove existing OIIO
|
||||
if: matrix.openimageio_ver != ''
|
||||
run: |
|
||||
sudo rm -rf /usr/local/include/OpenImageIO
|
||||
sudo rm -rf /usr/local/lib*/cmake/OpenImageIO
|
||||
sudo rm -rf /usr/local/lib*/libOpenImageIO*
|
||||
sudo rm -rf /usr/local/lib*/python3.9/site-packages/OpenImageIO*
|
||||
- name: Dependencies
|
||||
run: |
|
||||
${{matrix.depcmds}}
|
||||
src/build-scripts/gh-installdeps.bash
|
||||
- name: Build
|
||||
run: src/build-scripts/ci-build.bash
|
||||
- name: Testsuite
|
||||
if: matrix.skip_tests != '1'
|
||||
run: src/build-scripts/ci-test.bash
|
||||
- name: Code coverage
|
||||
if: matrix.coverage == '1'
|
||||
run: src/build-scripts/ci-coverage.bash
|
||||
- name: Sonar-scanner
|
||||
if: matrix.sonar == 1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
sonar-scanner -X --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="build/bw_output" --define sonar.cfamily.gcov.reportsPath="_coverage"
|
||||
+451
-309
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# GitHub Actions workflow file for CI
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
@@ -21,333 +21,475 @@ on:
|
||||
- '**.tex'
|
||||
schedule:
|
||||
# Full nightly build
|
||||
- cron: "0 4 * * *"
|
||||
- cron: "0 6 * * *"
|
||||
|
||||
permissions: read-all
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
vfxplatform-2019:
|
||||
name: "Linux VFXP-2019: gcc6 C++11 llvm7 py2.7 boost-1.66 exr-2.3 OIIO-2.0 sse2"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
aswf:
|
||||
name: "VFX${{matrix.vfxyear}} ${{matrix.desc}}"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- desc: gcc6/C++14 llvm9 py2.7 boost1.66 exr2.3 oiio2.2 sse2
|
||||
nametag: linux-vfx2019
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2019
|
||||
vfxsuffix: -clang9
|
||||
cxx_std: 14
|
||||
openimageio_ver: v2.3.17.0
|
||||
python_ver: 2.7
|
||||
pybind11_ver: v2.4.2
|
||||
- desc: clang9/C++14 llvm9 oiio-release boost1.66 avx2 exr2.3 py2.7
|
||||
nametag: linux-clang9-llvm9
|
||||
os: ubuntu-18.04
|
||||
vfxyear: 2019
|
||||
vfxsuffix: -clang9
|
||||
cc_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
cxx_std: 14
|
||||
openimageio_ver: release
|
||||
python_ver: 2.7
|
||||
# pybind11_ver: v2.9.0
|
||||
simd: avx
|
||||
- desc: GPU Cuda10 gcc6/C++14 llvm10 py2.7 boost-1.70 exr-2.3 OIIO-master avx2
|
||||
nametag: linux-optix7-2019
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2019
|
||||
vfxsuffix: -clang10
|
||||
cxx_std: 14
|
||||
openimageio_ver: master
|
||||
python_ver: 2.7
|
||||
# pybind11_ver: v2.9.0
|
||||
simd: avx2,f16c
|
||||
skip_tests: 1
|
||||
setenvs: export OSL_CMAKE_FLAGS="-DUSE_OPTIX=1" OPTIX_VERSION=7.0
|
||||
- desc: gcc6/C++14 llvm10 py3.7 boost1.70 exr2.4 oiio2.2 sse4
|
||||
nametag: linux-vfx2020
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2020
|
||||
cxx_std: 14
|
||||
openimageio_ver: v2.3.17.0
|
||||
python_ver: 3.7
|
||||
pybind11_ver: v2.5.0
|
||||
simd: sse4.2
|
||||
setenvs: export CONAN_LLVM_VERSION=10.0.1
|
||||
- desc: gcc9/C++17 llvm11 py3.7 boost1.73 exr2.5 oiio2.2 avx2 batch-b8avx2
|
||||
nametag: linux-vfx2021
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2021
|
||||
vfxsuffix: -clang11
|
||||
cxx_std: 17
|
||||
openimageio_ver: dev-2.3
|
||||
python_ver: 3.7
|
||||
pybind11_ver: v2.7.0
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2_noFMA
|
||||
- desc: gcc9/C++17 llvm13 py3.9 boost1.76 exr3.1 oiio2.3 avx2
|
||||
nametag: linux-vfx2022
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang13
|
||||
cxx_std: 17
|
||||
openimageio_ver: release
|
||||
python_ver: 3.9
|
||||
pybind11_ver: v2.9.0
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2
|
||||
- desc: clang12/C++17 llvm12 oiio-master boost1.73 exr3.1 py3.9 avx2 batch-avx512
|
||||
nametag: linux-clang12-llvm12-batch
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang12
|
||||
cxx_std: 17
|
||||
openimageio_ver: master
|
||||
python_ver: 3.9
|
||||
pybind11_ver: v2.6.2
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2,b8_AVX512,b16_AVX512
|
||||
setenvs: USE_OPENVDB=0
|
||||
- desc: icc/C++17 llvm13 py3.9 boost1.76 exr3.1 oiio-master avx2
|
||||
nametag: linux-icc
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang13
|
||||
cc_compiler: icc
|
||||
cxx_compiler: icpc
|
||||
cxx_std: 17
|
||||
fmt_ver: 7.1.3
|
||||
openimageio_ver: master
|
||||
python_ver: 3.9
|
||||
pybind11_ver: v2.9.0
|
||||
# simd: avx2,f16c
|
||||
batched: b8_AVX2_noFMA
|
||||
setenvs: export OSL_CMAKE_FLAGS="-DSTOP_ON_WARNING=OFF -DEXTRA_CPP_ARGS=-fp-model=consistent"
|
||||
OPENIMAGEIO_CMAKE_FLAGS=-DBUILD_FMT_VERSION=7.1.3
|
||||
USE_OPENVDB=0
|
||||
- desc: icx/C++17 llvm13 py3.9 boost1.76 exr3.1 oiio2.3 avx2
|
||||
nametag: linux-icx
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang13
|
||||
cc_compiler: icx
|
||||
cxx_compiler: icpx
|
||||
cxx_std: 17
|
||||
fmt_ver: 7.1.3
|
||||
openimageio_ver: master
|
||||
python_ver: 3.9
|
||||
pybind11_ver: v2.9.0
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2_noFMA
|
||||
setenvs: export OSL_CMAKE_FLAGS="-DSTOP_ON_WARNING=OFF" USE_OPENVDB=0
|
||||
- desc: oldest everything gcc6/C++14 llvm9 py2.7 boost1.66 oiio2.2 no-simd exr2.3
|
||||
nametag: linux-oldest
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2019
|
||||
vfxsuffix: -clang9
|
||||
cxx_std: 14
|
||||
openimageio_ver: v2.3.17.0
|
||||
python_ver: 2.7
|
||||
pybind11_ver: v2.6.2
|
||||
simd: 0
|
||||
setenvs: export PUGIXML_VERSION=v1.8
|
||||
|
||||
# Address and leak sanitizers
|
||||
- desc: sanitizers
|
||||
nametag: sanitizer
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang13
|
||||
cc_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
cxx_std: 17
|
||||
openimageio_ver: master
|
||||
python_ver: 3.9
|
||||
pybind11_ver: v2.9.0
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2
|
||||
setenvs: export OSL_CMAKE_FLAGS="-DSANITIZE=address -DOSL_TEST_BIG_TIMEOUT=1200"
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
CTEST_TEST_TIMEOUT=1200
|
||||
CTEST_EXCLUSIONS="broken|noise-reg.regress|noise-gabor-reg.regress|example-.*deformer|spline-reg.regress.batched|osl-imageio"
|
||||
OSL_OPTIONS=llvm_debugging_symbols=1
|
||||
TESTRENDER_AA=1
|
||||
OSL_TESTSUITE_SKIP_DIFF=1
|
||||
# Sanitizer notes:
|
||||
# - There are a handful of tests we disable entirely with
|
||||
# CTEST_EXCLUSIONS because they are irrelevant or just cannot be
|
||||
# made to be clean (and that's ok).
|
||||
# - Tests with sanitizers run slow, so we increase timeouts, and
|
||||
# also set AA to 1 for render tests to speed them up.
|
||||
# OSL_TESTSUITE_SKIP_DIFF prevents making the AA=1 image result
|
||||
# fail, but that's ok because every other CI test is checking
|
||||
# the results; here we have no reason to believe results will
|
||||
# differ from other tests, we just need to run with sanitizers
|
||||
# turned on.
|
||||
# - In testing.cmake, we rig texture tests to disable the leak
|
||||
# sanitizer, because we can't eliminate some completely benign
|
||||
# leaks from the texture system, and because they are called
|
||||
# from JITed code, we don't get a clean stack trace of things
|
||||
# that happen in OIIO and therefore we just can't enumerate the
|
||||
# allowed exceptions. So we trust that OIIO itself tests the
|
||||
# texture system adequately and is able to ignore the benign
|
||||
# "leaks."
|
||||
|
||||
# Test formatting. This test entry doesn't do a full build, it
|
||||
# just runs clang-format on everything, and passes if nothing is
|
||||
# misformatted. Upon failure, the build artifact will be the full
|
||||
# source code with the formatting fixed (diffs will also appear in
|
||||
# the console output).
|
||||
- desc: "clang-format"
|
||||
nametag: clang-format
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang14
|
||||
cxx_std: 17
|
||||
openimageio_ver: release
|
||||
python_ver: 3.9
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2
|
||||
skip_tests: 1
|
||||
setenvs: export BUILDTARGET=clang-format
|
||||
OPENIMAGEIO_CMAKE_FLAGS=-DUSE_PYTHON=0
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
container:
|
||||
image: aswf/ci-osl:2019
|
||||
image: aswftesting/ci-osl:${{matrix.vfxyear}}${{matrix.vfxsuffix}}
|
||||
env:
|
||||
CXX: ${{matrix.cxx_compiler}}
|
||||
CC: ${{matrix.cc_compiler}}
|
||||
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
|
||||
FMT_VERSION: ${{matrix.fmt_ver}}
|
||||
OPENEXR_VERSION: ${{matrix.openexr_ver}}
|
||||
OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
|
||||
PYBIND11_VERSION: ${{matrix.pybind11_ver}}
|
||||
PYTHON_VERSION: ${{matrix.python_ver}}
|
||||
USE_BATCHED: ${{matrix.batched}}
|
||||
USE_SIMD: ${{matrix.simd}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++
|
||||
CC: gcc
|
||||
CMAKE_CXX_STANDARD: 11
|
||||
PYTHON_VERSION: 2.7
|
||||
USE_PYTHON: 0
|
||||
# We would like to use harden-runner, but it flags too many false
|
||||
# positives, every time we download a dependency. We should use it only
|
||||
# on CI runs where we are producing artifacts that users might rely on.
|
||||
# - name: Harden Runner
|
||||
# uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
|
||||
# with:
|
||||
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_keys
|
||||
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
|
||||
- name: ccache
|
||||
id: ccache
|
||||
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
|
||||
restore-keys: ${{github.job}}-${{matrix.nametag}}-
|
||||
- name: Build setup
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps-centos.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
${{matrix.setenvs}}
|
||||
src/build-scripts/ci-startup.bash
|
||||
- name: Remove existing OIIO
|
||||
if: matrix.openimageio_ver != ''
|
||||
run: |
|
||||
sudo rm -rf /usr/local/include/OpenImageIO
|
||||
sudo rm -rf /usr/local/lib*/cmake/OpenImageIO
|
||||
sudo rm -rf /usr/local/lib*/libOpenImageIO*
|
||||
sudo rm -rf /usr/local/lib*/python3.9/site-packages/OpenImageIO*
|
||||
- name: Dependencies
|
||||
run: |
|
||||
${{matrix.depcmds}}
|
||||
src/build-scripts/gh-installdeps.bash
|
||||
- name: Build
|
||||
run: |
|
||||
src/build-scripts/ci-build.bash
|
||||
- name: Testsuite
|
||||
if: matrix.skip_tests != '1'
|
||||
run: src/build-scripts/ci-test.bash
|
||||
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
name: osl-${{github.job}}-${{matrix.nametag}}
|
||||
path: |
|
||||
build/*.cmake
|
||||
build/CMake*
|
||||
build/testsuite/*/*.*
|
||||
|
||||
vfxplatform-2020:
|
||||
name: "Linux VFXP-2020 gcc6/C++14 llvm7 py3.7 boost-1.70 exr-2.4 OIIO-2.1 sse4"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: aswf/ci-osl:2020
|
||||
|
||||
ubuntu:
|
||||
name: "Ubuntu ${{matrix.desc}}"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- desc: Debug gcc7/C++14 llvm9 py2.7 oiio2.3 exr2.4 sse4 boost1.65 exr2.4
|
||||
nametag: linux-debug-gcc7-llvm9
|
||||
os: ubuntu-18.04
|
||||
cxx_compiler: g++-7
|
||||
cxx_std: 14
|
||||
openexr_ver: v2.4.3
|
||||
openimageio_ver: dev-2.3
|
||||
pybind11_ver: v2.6.2
|
||||
python_ver: 2.7
|
||||
simd: sse4.2
|
||||
setenvs: export CMAKE_BUILD_TYPE=Debug
|
||||
LLVM_VERSION=9.0.0
|
||||
PUGIXML_VERSION=v1.9
|
||||
CTEST_TEST_TIMEOUT=240
|
||||
- desc: gcc10/C++17 llvm10 oiio-release boost1.65 exr2.5 avx2
|
||||
nametag: linux-2021ish-gcc10-llvm10
|
||||
os: ubuntu-18.04
|
||||
cxx_compiler: g++-10
|
||||
cxx_std: 17
|
||||
fmt_ver: 7.0.1
|
||||
openexr_ver: v2.5.6
|
||||
openimageio_ver: release
|
||||
pybind11_ver: v2.8.1
|
||||
# python_ver: 2.7 FIXME
|
||||
simd: avx2,f16c
|
||||
setenvs: export LLVM_VERSION=10.0.0
|
||||
OPENIMAGEIO_CMAKE_FLAGS="-DBUILD_FMT_VERSION=7.0.1"
|
||||
PUGIXML_VERSION=v1.10
|
||||
- desc: latest releases gcc11/C++17 llvm13 boost1.71 exr3.1 py3.9 avx2 batch-b16avx512
|
||||
nametag: linux-latest-releases
|
||||
os: ubuntu-20.04
|
||||
cxx_compiler: g++-11
|
||||
cxx_std: 17
|
||||
fmt_ver: 9.1.0
|
||||
openexr_ver: v3.1.5
|
||||
openimageio_ver: master
|
||||
pybind11_ver: v2.10.0
|
||||
python_ver: 3.9
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2,b8_AVX512,b16_AVX512
|
||||
setenvs: export LLVM_VERSION=13.0.0
|
||||
LLVM_DISTRO_NAME=ubuntu-20.04
|
||||
OPENCOLORIO_VERSION=v2.1.2
|
||||
PUGIXML_VERSION=v1.11.4
|
||||
- desc: bleeding edge gcc12/C++17 llvm14 oiio/ocio/exr/pybind-master boost1.71 py3.10 avx2 batch-b16avx512
|
||||
nametag: linux-bleeding-edge
|
||||
os: ubuntu-22.04
|
||||
cxx_compiler: g++-12
|
||||
cxx_std: 17
|
||||
fmt_ver: master
|
||||
openexr_ver: main
|
||||
openimageio_ver: master
|
||||
pybind11_ver: master
|
||||
python_ver: "3.10"
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2,b8_AVX512,b16_AVX512
|
||||
setenvs: export LLVM_VERSION=14.0.0
|
||||
LLVM_DISTRO_NAME=ubuntu-18.04
|
||||
OPENCOLORIO_VERSION=main
|
||||
PUGIXML_VERSION=master
|
||||
- desc: clang14/C++17 llvm14 boost1.71 exr3.1 py3.8 avx2 batch-b16avx512
|
||||
nametag: linux-latest-releases-clang
|
||||
os: ubuntu-20.04
|
||||
cxx_compiler: clang++
|
||||
cc_compiler: clang
|
||||
cxx_std: 17
|
||||
fmt_ver: 8.1.1
|
||||
openexr_ver: v3.1.5
|
||||
openimageio_ver: master
|
||||
pybind11_ver: v2.9.2
|
||||
python_ver: 3.8
|
||||
simd: avx2,f16c
|
||||
batched: b8_AVX2,b8_AVX512,b16_AVX512
|
||||
setenvs: export LLVM_VERSION=14.0.0
|
||||
LLVM_DISTRO_NAME=ubuntu-18.04
|
||||
OPENCOLORIO_VERSION=v2.1.2
|
||||
PUGIXML_VERSION=v1.11.4
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
env:
|
||||
CXX: ${{matrix.cxx_compiler}}
|
||||
CC: ${{matrix.cc_compiler}}
|
||||
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
|
||||
FMT_VERSION: ${{matrix.fmt_ver}}
|
||||
OPENEXR_VERSION: ${{matrix.openexr_ver}}
|
||||
OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
|
||||
PYBIND11_VERSION: ${{matrix.pybind11_ver}}
|
||||
PYTHON_VERSION: ${{matrix.python_ver}}
|
||||
USE_BATCHED: ${{matrix.batched}}
|
||||
USE_SIMD: ${{matrix.simd}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++
|
||||
CC: gcc
|
||||
CMAKE_CXX_STANDARD: 14
|
||||
PYTHON_VERSION: 3.7
|
||||
USE_SIMD: sse4.2
|
||||
# We would like to use harden-runner, but it flags too many false
|
||||
# positives, every time we download a dependency. We should use it only
|
||||
# on CI runs where we are producing artifacts that users might rely on.
|
||||
# - name: Harden Runner
|
||||
# uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
|
||||
# with:
|
||||
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_keys
|
||||
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
|
||||
- name: ccache
|
||||
id: ccache
|
||||
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
|
||||
restore-keys: ${{github.job}}-${{matrix.nametag}}-
|
||||
- name: Build setup
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps-centos.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
${{matrix.setenvs}}
|
||||
src/build-scripts/ci-startup.bash
|
||||
- name: Dependencies
|
||||
run: |
|
||||
${{matrix.depcmds}}
|
||||
src/build-scripts/gh-installdeps.bash
|
||||
- name: Build
|
||||
run: src/build-scripts/ci-build.bash
|
||||
- name: Testsuite
|
||||
if: matrix.skip_tests != '1'
|
||||
run: src/build-scripts/ci-test.bash
|
||||
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
name: osl-${{github.job}}-${{matrix.nametag}}
|
||||
path: |
|
||||
build/*.cmake
|
||||
build/CMake*
|
||||
build/testsuite/*/*.*
|
||||
|
||||
vfxplatform-2021:
|
||||
name: "Linux VFXP-2021 gcc9/C++17 llvm10 py3.7 boost-1.70 exr-2.5 OIIO-2.2 avx2"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: aswf/ci-osl:2021
|
||||
|
||||
macos:
|
||||
name: "${{matrix.os}} appleclang${{matrix.aclang}}/C++${{matrix.cxx_std}} py${{matrix.python_ver}} ${{matrix.desc}}"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- desc: MacOS-11
|
||||
os: macos-11
|
||||
nametag: macos11-py39
|
||||
cc_compiler: /usr/local/opt/llvm@14/bin/clang
|
||||
cxx_compiler: /usr/local/opt/llvm@14/bin/clang++
|
||||
cxx_std: 17
|
||||
python_ver: "3.10"
|
||||
aclang: 13
|
||||
setenvs: export LLVMBREWVER="@14" DO_BREW_UPDATE=1
|
||||
- desc: MacOS-12
|
||||
os: macos-12
|
||||
nametag: macos11-p310
|
||||
cc_compiler: /usr/local/opt/llvm@15/bin/clang
|
||||
cxx_compiler: /usr/local/opt/llvm@15/bin/clang++
|
||||
cxx_std: 17
|
||||
python_ver: "3.10"
|
||||
aclang: 13
|
||||
setenvs: export LLVMBREWVER="@15" DO_BREW_UPDATE=1
|
||||
runs-on: ${{matrix.os}}
|
||||
env:
|
||||
CXX: ${{matrix.cxx_compiler}}
|
||||
CC: ${{matrix.cc_compiler}}
|
||||
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
|
||||
PYTHON_VERSION: ${{matrix.python_ver}}
|
||||
OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++
|
||||
CC: gcc
|
||||
CMAKE_CXX_STANDARD: 17
|
||||
PYTHON_VERSION: 3.7
|
||||
USE_SIMD: avx2,f16c
|
||||
OPENEXR_VERSION: 2.5.0
|
||||
OPENIMAGEIO_BRANCH: RB-2.2
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps-centos.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_keys
|
||||
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
|
||||
- name: ccache
|
||||
id: ccache
|
||||
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
linux-debug-gcc7-llvm8:
|
||||
name: "Linux Debug gcc7, C++14, llvm8, OIIO release, sse4, exr2.4"
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++-7
|
||||
USE_CPP: 14
|
||||
CMAKE_CXX_STANDARD: 14
|
||||
LLVM_VERSION: 8.0.0
|
||||
OPENEXR_VERSION: 2.4.0
|
||||
OPENIMAGEIO_BRANCH: release
|
||||
USE_SIMD: sse4.2
|
||||
MY_CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Debug
|
||||
path: /Users/runner/.ccache
|
||||
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
|
||||
restore-keys: ${{github.job}}-${{matrix.nametag}}-
|
||||
- name: Build setup
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
linux-2020ish-clang9-llvm9:
|
||||
name: "Linux clang9, C++14, llvm9, oiio release, avx, exr2.4, avx"
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: clang++
|
||||
USE_CPP: 14
|
||||
CMAKE_CXX_STANDARD: 14
|
||||
LLVM_VERSION: 9.0.0
|
||||
USE_SIMD: avx
|
||||
OPENEXR_VERSION: 2.4.0
|
||||
OPENIMAGEIO_BRANCH: release
|
||||
${{matrix.setenvs}}
|
||||
src/build-scripts/ci-startup.bash
|
||||
- name: Dependencies
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
linux-2021ish-gcc8-llvm10:
|
||||
name: "Linux gcc8, C++17, llvm10, oiio master, avx2, exr2.5, avx2"
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++-8
|
||||
CMAKE_CXX_STANDARD: 17
|
||||
LLVM_VERSION: 10.0.0
|
||||
USE_SIMD: avx2,f16c
|
||||
OPENEXR_VERSION: 2.5.0
|
||||
OPENIMAGEIO_BRANCH: master
|
||||
OPENIMAGEIO_CMAKE_FLAGS: -DBUILD_FMT_VERSION=7.0.1
|
||||
PYBIND11_VERSION: 2.5.0
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
linux-bleeding-edge:
|
||||
# Test against development master for relevant dependencies, latest
|
||||
# supported releases of everything else.
|
||||
name: "Linux bleeding edge: gcc10, C++17, llvm10, oiio/ocio/exr/pybind-master, avx2"
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++-10
|
||||
USE_CPP: 17
|
||||
CMAKE_CXX_STANDARD: 17
|
||||
LLVM_VERSION: 10.0.0
|
||||
USE_SIMD: avx2,f16c
|
||||
OPENEXR_BRANCH: master
|
||||
OPENIMAGEIO_BRANCH: master
|
||||
OPENIMAGEIO_CMAKE_FLAGS: -DBUILD_FMT_VERSION=master
|
||||
OCIO_BRANCH: master
|
||||
PYBIND11_BRANCH: master
|
||||
OSL_BUILD_MATERIALX: 1
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
linux-oldest:
|
||||
# Oldest versions of the dependencies that we can muster, and various
|
||||
# things disabled.
|
||||
name: "Linux oldest everything: gcc6 C++11 llvm7 py2.7 boost-1.66 oiio-2.0 no-simd exr2.3"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: aswf/ci-osl:2019
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: g++
|
||||
CC: gcc
|
||||
CMAKE_CXX_STANDARD: 11
|
||||
PYTHON_VERSION: 2.7
|
||||
USE_SIMD: 0
|
||||
USE_PYTHON: 0
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps-centos.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
macos-py38:
|
||||
name: "Mac py38"
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
CXX: clang++
|
||||
USE_CPP: 14
|
||||
CMAKE_CXX_STANDARD: 14
|
||||
PYTHON_VERSION: 3.8
|
||||
LLVM_BC_GENERATOR: /usr/bin/clang++
|
||||
MY_CMAKE_FLAGS: -DLLVM_BC_GENERATOR=/usr/bin/clang++
|
||||
# ^^ Force bitcode compiles to use the system clang compiler by
|
||||
# preemptively telling it the LLVM_BC_GENERATOR, to avoid some
|
||||
# library mismatches we tend to see on GH CI's Mac images.
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/install_homebrew_deps.bash
|
||||
OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0"
|
||||
source src/build-scripts/build_openimageio.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/*/testsuite/*/*.*
|
||||
|
||||
# windows:
|
||||
# name: "Windows"
|
||||
# runs-on: windows-2019
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - name: Setup Nuget.exe
|
||||
# uses: warrenbuckley/Setup-Nuget@v1
|
||||
# - name: all
|
||||
# shell: bash
|
||||
# env:
|
||||
# PYTHON_VERSION: 3.6
|
||||
# CMAKE_GENERATOR: "Visual Studio 16 2019"
|
||||
# OPENEXR_VERSION: 2.4.0
|
||||
# run: |
|
||||
# source src/build-scripts/ci-startup.bash
|
||||
# source src/build-scripts/gh-win-installdeps.bash
|
||||
# source src/build-scripts/ci-build-and-test.bash
|
||||
# - uses: actions/upload-artifact@v2
|
||||
# if: failure()
|
||||
# with:
|
||||
# name: ${{ github.job }}
|
||||
# path: build/*/testsuite/*/*.*
|
||||
|
||||
# sanitizer:
|
||||
# name: "Sanitizers"
|
||||
# runs-on: ubuntu-18.04
|
||||
# if: github.event_name == 'pull_request' || contains(github.ref, 'san') || contains(github.ref, 'RB') || contains(github.ref, 'release') || contains(github.ref, 'master') || contains(github.ref, 'gh')
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# #- uses: docker://aswfstaging/ci-base:2019
|
||||
# - name: all
|
||||
# env:
|
||||
# CXX: g++-7
|
||||
# CMAKE_CXX_STANDARD: 14
|
||||
# SANITIZE: address
|
||||
# USE_PYTHON: 0
|
||||
# run: |
|
||||
# source src/build-scripts/ci-startup.bash
|
||||
# source src/build-scripts/gh-installdeps.bash
|
||||
# source src/build-scripts/ci-build-and-test.bash
|
||||
# - uses: actions/upload-artifact@v2
|
||||
# if: failure()
|
||||
# with:
|
||||
# name: ${{ github.job }}
|
||||
# path: build/*/testsuite/*/*.*
|
||||
|
||||
# linux-static:
|
||||
# name: "Linux static libs: gcc7, C++14, exr2.3"
|
||||
# runs-on: ubuntu-18.04
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# #- uses: docker://aswfstaging/ci-base:2019
|
||||
# - name: all
|
||||
# env:
|
||||
# CXX: g++-7
|
||||
# CMAKE_CXX_STANDARD: 14
|
||||
# BUILD_SHARED_LIBS: OFF
|
||||
# run: |
|
||||
# source src/build-scripts/ci-startup.bash
|
||||
# source src/build-scripts/gh-installdeps.bash
|
||||
# source src/build-scripts/ci-build-and-test.bash
|
||||
# - uses: actions/upload-artifact@v2
|
||||
# if: failure()
|
||||
# with:
|
||||
# name: ${{ github.job }}
|
||||
# path: build/*/testsuite/*/*.*
|
||||
|
||||
clang-format:
|
||||
# Test formatting. This test entry doesn't do a full build, it just runs
|
||||
# clang-format on everything, and passes if nothing is misformatted.
|
||||
# Upon failure, the build artifact will be the full source code with the
|
||||
# formatting fixed (diffs will also appear in the console output).
|
||||
name: "clang-format verification"
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: aswf/ci-osl:2021
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: all
|
||||
env:
|
||||
BUILDTARGET: clang-format
|
||||
CMAKE_CXX_STANDARD: 17
|
||||
PYTHON_VERSION: 3.7
|
||||
SKIP_TESTS: 1
|
||||
if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then \
|
||||
OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0" ; \
|
||||
source src/build-scripts/build_openimageio.bash ; \
|
||||
else \
|
||||
brew install --display-times -q openimageio ; \
|
||||
PYTHONPATH=$PYTHONPATH:/usr/local/python${PYTHON_VERSION}/site-packages ; \
|
||||
fi
|
||||
src/build-scripts/save-env.bash
|
||||
- name: Build
|
||||
run: |
|
||||
source src/build-scripts/ci-startup.bash
|
||||
source src/build-scripts/gh-installdeps-centos.bash
|
||||
source src/build-scripts/ci-build-and-test.bash
|
||||
- uses: actions/upload-artifact@v2
|
||||
src/build-scripts/ci-build.bash
|
||||
- name: Testsuite
|
||||
run: src/build-scripts/ci-test.bash
|
||||
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: src/*/*.{cpp,h}
|
||||
name: osl-${{github.job}}-${{matrix.nametag}}
|
||||
path: |
|
||||
build/*.cmake
|
||||
build/CMake*
|
||||
build/testsuite/*/*.*
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
name: Scorecards supply-chain security
|
||||
on:
|
||||
# Only the default branch is supported.
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '44 20 * * 6'
|
||||
push:
|
||||
branches: [ "main", "scorecard" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecards analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Used to receive a badge. (Upcoming feature)
|
||||
id-token: write
|
||||
# Needs for private repositories.
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@3e15ea8318eee9b333819ec77a36aca8d39df13e # v1.1.1
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecards on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
|
||||
|
||||
# Publish the results for public repositories to enable scorecard badges. For more details, see
|
||||
# https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories, `publish_results` will automatically be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
+4
-1
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
dist
|
||||
build
|
||||
@@ -8,3 +8,6 @@ build
|
||||
\#*\#
|
||||
*.pyc
|
||||
*.log
|
||||
.vscode
|
||||
.envrc
|
||||
|
||||
|
||||
-183
@@ -1,183 +0,0 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
|
||||
# .travis.yml for OSL
|
||||
|
||||
language: cpp
|
||||
osx_image: xcode10
|
||||
dist: xenial
|
||||
|
||||
|
||||
# Add-ons: specify apt packages for Linux
|
||||
# We actaully specify packages per-matrix-entry, so these don't do anything
|
||||
# except to tag them (&add-sources, &common-packages, &common-boost-packages)
|
||||
# so they can be referened later ('*') to save repetition.
|
||||
addons:
|
||||
apt:
|
||||
sources: &add-sources
|
||||
- ubuntu-toolchain-r-test
|
||||
packages: &common-packages
|
||||
- libgif-dev
|
||||
- libfreetype6-dev
|
||||
- python-numpy
|
||||
- ninja-build
|
||||
- libfreetype6-dev
|
||||
- libpugixml-dev
|
||||
packages: &common-boost-packages
|
||||
- libboost1.58-dev
|
||||
- libboost-filesystem1.58
|
||||
- libboost-regex1.58
|
||||
- libboost-system1.58
|
||||
- libboost-thread1.58
|
||||
packages: &old-boost-packages
|
||||
- libboost1.55-dev
|
||||
- libboost-filesystem1.55
|
||||
- libboost-regex1.55
|
||||
- libboost-system1.55
|
||||
- libboost-thread1.55
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
apt: true
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
|
||||
before_install:
|
||||
- source src/build-scripts/ci-startup.bash
|
||||
- export WHICHGCC=${WHICHGCC:="4.8"}
|
||||
- if [ "$CXX" == "g++" ]; then export CXX="g++-${WHICHGCC}" ; fi
|
||||
|
||||
install:
|
||||
- if [ $TRAVIS_OS_NAME == osx ] ; then source src/build-scripts/install_homebrew_deps.bash ; fi
|
||||
- if [ "$BUILD_CMAKE" == "1" ] ; then source src/build-scripts/build_cmake.bash ; fi
|
||||
- source src/build-scripts/build_llvm.bash ;
|
||||
- if [ $TRAVIS_OS_NAME == linux ] ; then source src/build-scripts/build_pybind11.bash ; fi
|
||||
- if [ $TRAVIS_OS_NAME == linux ] ; then CXX="ccache $CXX" source src/build-scripts/build_openexr.bash ; fi
|
||||
|
||||
# Note: can remove the ILMBASE_HOME/OPENEXR_HOME when OIIO 2.x is floor
|
||||
- export OPENIMAGEIO_MAKEFLAGS="$OPENIMAGEIO_MAKEFLAGS -j2 DEBUG= USE_PYTHON=0 OIIO_BUILD_TESTS=0"
|
||||
- export ENABLE_iinfo=0 ENABLE_iv=0 ENABLE_igrep=0 ENABLE_iconvert=0 ENABLE_testtex=0
|
||||
- export ENABLE_cineon=0 ENABLE_DDS=0 ENABLE_DPX=0 ENABLE_FITS=0
|
||||
- export ENABLE_iff=0 ENABLE_jpeg2000=0 ENABLE_PNM=0 ENABLE_PSD=0
|
||||
- export ENABLE_RLA=0 ENABLE_SGI=0 ENABLE_SOCKET=0 ENABLE_SOFTIMAGE=0
|
||||
- export ENABLE_TARGA=0 ENABLE_WEBP=0 ENABLE_TARGA=0
|
||||
- export OPENIMAGEIO_SITE=travis
|
||||
- export OPENIMAGEIO_INSTALLDIR=$HOME/ext/OpenImageIO/dist/$ARCH
|
||||
- export OSL_SITE=travis
|
||||
- source src/build-scripts/build_openimageio.bash
|
||||
- if [ $TRAVIS_OS_NAME == linux ] ; then
|
||||
export BUILD_FLAGS="$BUILD_FLAGS LLVM_STATIC=1" ;
|
||||
export TEST_FLAGS="-E broken\|render-cornell\|render-oren-nayar\|render-veachmis\|render-ward" ;
|
||||
fi
|
||||
# ^^^ Linux only, can't make these test work. Exclude for now and return later. ;
|
||||
|
||||
# before_script:
|
||||
|
||||
script:
|
||||
- export LD_LIBRARY_PATH=$OpenImageIO_ROOT/lib:$OSL_ROOT/lib:$LD_LIBRARY_PATH
|
||||
- export DYLD_LIBRARY_PATH=$OpenImageIO_ROOT/lib:$OSL_ROOT/lib:$DYLD_LIBRARY_PATH
|
||||
- source src/build-scripts/ci-build-and-test.bash
|
||||
|
||||
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /RB-/
|
||||
- /lg-/
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- name: "VFX Platform 2018 (gcc6, c++14), llvm 7, OIIO master, OpenEXR 2.3, avx/f16c"
|
||||
os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *common-boost-packages
|
||||
- g++-6
|
||||
env: WHICHGCC=6 USE_CPP=14 LLVM_VERSION=7.0.1 OPENIMAGEIO_BRANCH=master OPENEXR_VERSION=2.3.0 USE_SIMD=avx,f16c BUILD_CMAKE=1
|
||||
- name: "MacOS (latest Apple clang, llvm 7, OIIO master, latest homebrew libs"
|
||||
os: osx
|
||||
compiler: clang
|
||||
env: PYTHON_VERSION=3.7 USE_CPP=14
|
||||
- name: "VFX Platform 2017 (gcc48, c++11), llvm 7, OIIO release, OpenEXR 2.3, sse4.2"
|
||||
os: linux
|
||||
dist: trusty
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *old-boost-packages
|
||||
env: WHICHGCC=4.8 USE_CPP=11 LLVM_VERSION=7.0.1 USE_SIMD=sse4.2 OPENIMAGEIO_BRANCH=release OPENEXR_VERSION=2.3.0 BUILD_CMAKE=1
|
||||
- name: "Older things: OIIO 2.0, llvm 7, boost 1.58, OpenEXR 2.2"
|
||||
os: linux
|
||||
dist: trusty
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *old-boost-packages
|
||||
env: WHICHGCC=4.8 USE_CPP=11 LLVM_VERSION=7.0.1 USE_SIMD=sse4.2 OPENIMAGEIO_BRANCH=RB-2.0 OPENEXR_VERSION=2.2.0 BUILD_CMAKE=1
|
||||
if: branch =~ /(master|RB|travis)/ OR type = pull_request
|
||||
- name: "gcc7, llvm7, C++14"
|
||||
os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *common-boost-packages
|
||||
- g++-7
|
||||
env: WHICHGCC=7 USE_CPP=14 LLVM_VERSION=7.0.0 BUILD_CMAKE=1
|
||||
if: branch =~ /(master|RB|travis)/ OR type = pull_request
|
||||
- name: "Future: gcc8, C++14, LLVM 7, OIIO master, AVX/f16c"
|
||||
os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *common-boost-packages
|
||||
- g++-8
|
||||
env: WHICHGCC=8 USE_CPP=14 LLVM_VERSION=7.0.0 USE_SIMD=avx,f16c BUILD_CMAKE=1
|
||||
- name: "DEBUG build, LLVM 7, OIIO master"
|
||||
os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *common-boost-packages
|
||||
- g++-6
|
||||
env: DEBUG=1 WHICHGCC=6 LLVM_VERSION=7.0.0 OPENIMAGEIO_BRANCH=master BUILD_CMAKE=1
|
||||
- name: "Oldest everything: gcc4.8, LLVM 7, OIIO 2.0, OpenEXR 2.2, no simd"
|
||||
os: linux
|
||||
dist: trusty
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: *add-sources
|
||||
packages:
|
||||
- *common-packages
|
||||
- *old-boost-packages
|
||||
env: USE_SIMD=0 LLVM_VERSION=7.0.1 OPENIMAGEIO_BRANCH=RB-2.0 OPENEXR_VERSION=2.2.0 BUILD_CMAKE=1
|
||||
if: branch =~ /(master|RB|travis)/ OR type = pull_request
|
||||
|
||||
notifications:
|
||||
email:
|
||||
# recipients:
|
||||
# -
|
||||
on_success: change
|
||||
on_failure: always
|
||||
@@ -1,58 +0,0 @@
|
||||
Corporate Contributor License Agreement ("Agreement")
|
||||
|
||||
Thank you for your interest in the Open Shading Language Project a Series of
|
||||
LF Projects, LLC (hereinafter "Project"). In order to clarify the
|
||||
intellectual property licenses granted with Contributions from any corporate
|
||||
entity to the Project, LF Projects, LLC ("LF Projects") is required to have
|
||||
a Corporate Contributor License Agreement (CCLA) on file that has been
|
||||
signed by each contributing corporation.
|
||||
|
||||
Each contributing corporation ("You") must accept and agree that, for any
|
||||
Contribution (as defined below), You and all other individuals and entities
|
||||
that control You, are controlled by You, or are under common control with
|
||||
You, are bound by the licenses granted and representations made as though
|
||||
all such individuals and entities are a single contributor. For the purposes
|
||||
of this definition, "control" means (i) the power, direct or indirect, to
|
||||
cause the direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"Contribution" means any code, documentation or other original work of
|
||||
authorship that is submitted to LF Projects for inclusion in the Project by
|
||||
Your employee or by any individual or entity that controls You, or is under
|
||||
common control with You or is controlled by You and authorized to make the
|
||||
submission on Your behalf.
|
||||
|
||||
You accept and agree that all of Your present and future Contributions to
|
||||
the Project shall be:
|
||||
|
||||
Submitted under a Developer's Certificate of Origin v. 1.1 (DCO); and
|
||||
Licensed under the BSD-3-Clause License.
|
||||
|
||||
You agree that You shall be bound by the terms of the BSD-3-Clause License
|
||||
for all contributions made by You and Your employees. Your designated
|
||||
employees are those listed by Your CLA Manager(s) on the system of record
|
||||
for the Project. You agree to identify Your initial CLA Manager below and
|
||||
thereafter maintain current CLA Manager records in the Project's system of
|
||||
record.
|
||||
|
||||
|
||||
Initial CLA Manager (Name and Email): ______________________________________
|
||||
|
||||
|
||||
Corporate Signature:
|
||||
|
||||
|
||||
Company Name: ____________________________________________
|
||||
|
||||
|
||||
Signature: _______________________________________________
|
||||
|
||||
|
||||
Name: _______________________________________________
|
||||
|
||||
|
||||
Title _______________________________________________
|
||||
|
||||
|
||||
Date: _______________________________________________
|
||||
@@ -0,0 +1,149 @@
|
||||
Project Name: Open Shading Language
|
||||
|
||||
Project Entity: Open Shading Language Project a Series of LF Projects, LLC
|
||||
|
||||
If emailing signed PDF, send to: manager@lfprojects.org
|
||||
|
||||
**Software Grant and Corporate Contributor License Agreement ("Agreement") v2.1**
|
||||
|
||||
Thank you for your interest in the project specified above (the “Project”). In
|
||||
order to clarify the intellectual property license granted with Contributions
|
||||
from any person or entity, the Project must have a Contributor License Agreement
|
||||
(CLA) on file that has been signed by each Contributor, indicating agreement to
|
||||
the license terms below. This license is for your protection as a Contributor as
|
||||
well as the protection of the Project and its users; it does not change your
|
||||
rights to use your own Contributions for any other purpose.
|
||||
|
||||
This version of the Agreement allows an entity (the “Corporation”) to submit
|
||||
Contributions to the Project, to authorize Contributions submitted by its
|
||||
designated employees to the Project, and to grant copyright and patent licenses
|
||||
thereto.
|
||||
|
||||
If you have not already done so, please complete and sign this Agreement using
|
||||
the electronic signature portal made available to you by the Project or its
|
||||
third-party service providers, or email a PDF of the signed agreement to the
|
||||
email address specified above. Please read this document carefully before
|
||||
signing and keep a copy for your records.
|
||||
|
||||
You accept and agree to the following terms and conditions for Your present and
|
||||
future Contributions submitted to the Project. In return, the Project shall not
|
||||
use Your Contributions in a way that is contrary to the public benefit or
|
||||
inconsistent with its charter at the time of the Contribution. Except for the
|
||||
license granted herein to the Project and recipients of software distributed by
|
||||
the Project, You reserve all right, title, and interest in and to Your
|
||||
Contributions.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by
|
||||
the copyright owner that is making this Agreement with the Project. For legal
|
||||
entities, the entity making a Contribution and all other entities that
|
||||
control, are controlled by, or are under common control with that entity are
|
||||
considered to be a single Contributor. For the purposes of this definition,
|
||||
“control” means (i) the power, direct or indirect, to cause the direction or
|
||||
management of such entity, whether by contract or otherwise, or (ii) ownership
|
||||
of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.
|
||||
|
||||
“Contribution” shall mean the code, documentation or other original works of
|
||||
authorship, including any modifications or additions to an existing work, that
|
||||
is intentionally submitted by You to the Project for inclusion in, or
|
||||
documentation of, any of the products owned or managed by the Project (the
|
||||
“Work”). For the purposes of this definition, “submitted” means any form
|
||||
of electronic, verbal, or written communication sent to the Project or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Project for the purpose of discussing and
|
||||
improving the Work, but excluding communication that is conspicuously marked
|
||||
or otherwise designated in writing by You as “Not a Contribution.”
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable copyright license to reproduce, prepare
|
||||
derivative works of, publicly display, publicly perform, sublicense,
|
||||
and distribute Your Contributions and such derivative works.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable (except as stated in this section) patent
|
||||
license to make, have made, use, offer to sell, sell, import, and
|
||||
otherwise transfer the Work, where such license applies only to
|
||||
those patent claims licensable by You that are necessarily infringed
|
||||
by Your Contribution(s) alone or by combination of Your
|
||||
Contribution(s) with the Work to which such Contribution(s) were
|
||||
submitted. If any entity institutes patent litigation against You or
|
||||
any other entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that your Contribution, or the Work to which
|
||||
you have contributed, constitutes direct or contributory patent
|
||||
infringement, then any patent licenses granted to that entity under
|
||||
this Agreement for that Contribution or Work shall terminate as of
|
||||
the date such litigation is filed.
|
||||
|
||||
4. You represent that You are legally entitled to grant the above license. You
|
||||
represent further that the employee of the Corporation designated as the Initial
|
||||
CLA Manager below (and each who is designated in a subsequent written
|
||||
modification to the list of CLA Managers) (each, a “CLA Manager”) is
|
||||
authorized to maintain with the Project (1) the list of employees of the
|
||||
Corporation who are authorized to submit Contributions on behalf of the
|
||||
Corporation, and (2) the list of CLA Managers.
|
||||
|
||||
5. You represent that each of Your Contributions is Your original creation (see
|
||||
section 7 for submissions on behalf of others).
|
||||
|
||||
6. You are not expected to provide support for Your Contributions, except to the
|
||||
extent You desire to provide support. You may provide support for free, for a
|
||||
fee, or not at all. Unless required by applicable law or agreed to in writing,
|
||||
You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied, including, without
|
||||
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
7. Should You wish to submit work that is not Your original creation, You may
|
||||
submit it to the Project separately from any Contribution, identifying the
|
||||
complete details of its source and of any license or other restriction
|
||||
(including, but not limited to, related patents, trademarks, and license
|
||||
agreements) of which you are personally aware, and conspicuously marking the
|
||||
work as “Submitted on behalf of a third-party: [named here]”.
|
||||
|
||||
8. It is your responsibility to notify the Project when any change is required
|
||||
to the list of designated employees authorized to submit Contributions on behalf
|
||||
of the Corporation, or to the list of the CLA Managers.
|
||||
|
||||
\[Please complete and sign on the next page.\]
|
||||
|
||||
::: {style="page-break-after: always; visibility: hidden"}
|
||||
```{=tex}
|
||||
\pagebreak
|
||||
```
|
||||
:::
|
||||
|
||||
Please sign:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Date:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Signatory Name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Signatory E-mail:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Signatory Title:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Corporation Name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Corporation Address:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Initial CLA Manager Name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Initial CLA Manager E-Mail:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
@@ -1,33 +0,0 @@
|
||||
Individual Contributor License Agreement ("Agreement")
|
||||
|
||||
Thank you for your interest in the Open Shading Language Project a Series of
|
||||
LF Projects, LLC (hereinafter "Project"). In order to clarify the
|
||||
intellectual property licenses granted with Contributions from any corporate
|
||||
entity to the Project, LF Projects, LLC ("LF Projects") is required to have
|
||||
an Individual Contributor License Agreement (ICLA) on file that has been
|
||||
signed by each contributing individual. (For legal entities, please use the
|
||||
Corporate Contributor License Agreement (CCLA).)
|
||||
|
||||
Each contributing individual ("You") must accept and agree that, for any
|
||||
Contribution (as defined below), You are bound by the licenses granted and
|
||||
representations made herein.
|
||||
|
||||
"Contribution" means any code, documentation or other original work of
|
||||
authorship that is submitted to LF Projects for inclusion in the Project by
|
||||
You or by another person authorized to make the submission on Your behalf.
|
||||
|
||||
You accept and agree that all of Your present and future Contributions to
|
||||
the Project shall be:
|
||||
|
||||
Submitted under a Developer's Certificate of Origin v. 1.1 (DCO); and
|
||||
Licensed under the BSD-3-Clause License.
|
||||
|
||||
|
||||
|
||||
Signature: __________________________________________
|
||||
|
||||
|
||||
Name: _______________________________________________
|
||||
|
||||
|
||||
Date: _______________________________________________
|
||||
@@ -0,0 +1,137 @@
|
||||
Project Name: Open Shading Language
|
||||
|
||||
Project Entity: Open Shading Language Project a Series of LF Projects, LLC
|
||||
|
||||
If emailing signed PDF, send to: manager@lfprojects.org
|
||||
|
||||
**Individual Contributor License Agreement ("Agreement") v2.1**
|
||||
|
||||
Thank you for your interest in the project specified above (the “Project”). In
|
||||
order to clarify the intellectual property license granted with Contributions
|
||||
from any person or entity, the Project must have a Contributor License Agreement
|
||||
(CLA) on file that has been signed by each Contributor, indicating agreement to
|
||||
the license terms below. This license is for your protection as a Contributor as
|
||||
well as the protection of the Project and its users; it does not change your
|
||||
rights to use your own Contributions for any other purpose.
|
||||
|
||||
If you have not already done so, please complete and sign this Agreement using
|
||||
the electronic signature portal made available to you by the Project or its
|
||||
third-party service providers, or email a PDF of the signed agreement to the
|
||||
email address specified above. Please read this document carefully before
|
||||
signing and keep a copy for your records.
|
||||
|
||||
You accept and agree to the following terms and conditions for Your present and
|
||||
future Contributions submitted to the Project. In return, the Project shall not
|
||||
use Your Contributions in a way that is contrary to the public benefit or
|
||||
inconsistent with its charter at the time of the Contribution. Except for the
|
||||
license granted herein to the Project and recipients of software distributed by
|
||||
the Project, You reserve all right, title, and interest in and to Your
|
||||
Contributions.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by
|
||||
the copyright owner that is making this Agreement with the Project. For legal
|
||||
entities, the entity making a Contribution and all other entities that control,
|
||||
are controlled by, or are under common control with that entity are considered
|
||||
to be a single Contributor. For the purposes of this definition, “control”
|
||||
means (i) the power, direct or indirect, to cause the direction or management
|
||||
of such entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial ownership
|
||||
of such entity.
|
||||
|
||||
“Contribution” shall mean the code, documentation or other original works of
|
||||
authorship, including any modifications or additions to an existing work, that
|
||||
is intentionally submitted by You to the Project for inclusion in, or
|
||||
documentation of, any of the products owned or managed by the Project (the
|
||||
“Work”). For the purposes of this definition, “submitted” means any form of
|
||||
electronic, verbal, or written communication sent to the Project or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that are
|
||||
managed by, or on behalf of, the Project for the purpose of discussing and
|
||||
improving the Work, but excluding communication that is conspicuously marked or
|
||||
otherwise designated in writing by You as “Not a Contribution.”
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable copyright license to reproduce, prepare
|
||||
derivative works of, publicly display, publicly perform, sublicense,
|
||||
and distribute Your Contributions and such derivative works.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable (except as stated in this section) patent
|
||||
license to make, have made, use, offer to sell, sell, import, and
|
||||
otherwise transfer the Work, where such license applies only to
|
||||
those patent claims licensable by You that are necessarily infringed
|
||||
by Your Contribution(s) alone or by combination of Your
|
||||
Contribution(s) with the Work to which such Contribution(s) were
|
||||
submitted. If any entity institutes patent litigation against You or
|
||||
any other entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that your Contribution, or the Work to which
|
||||
you have contributed, constitutes direct or contributory patent
|
||||
infringement, then any patent licenses granted to that entity under
|
||||
this Agreement for that Contribution or Work shall terminate as of
|
||||
the date such litigation is filed.
|
||||
|
||||
4. You represent that you are legally entitled to grant the above license. If
|
||||
your employer(s) has rights to intellectual property that you create that
|
||||
includes your Contributions, you represent that you have received permission to
|
||||
make Contributions on behalf of that employer, that your employer has waived
|
||||
such rights for your Contributions to the Project, or that your employer has
|
||||
executed a separate Corporate CLA with the Project.
|
||||
|
||||
5. You represent that each of Your Contributions is Your original creation (see
|
||||
section 7 for submissions on behalf of others). You represent that Your
|
||||
Contribution submissions include complete details of any third-party license or
|
||||
other restriction (including, but not limited to, related patents and
|
||||
trademarks) of which you are personally aware and which are associated with
|
||||
any part of Your Contributions.
|
||||
|
||||
6. You are not expected to provide support for Your Contributions, except to the
|
||||
extent You desire to provide support. You may provide support for free, for a
|
||||
fee, or not at all. Unless required by applicable law or agreed to in writing,
|
||||
You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied, including, without
|
||||
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
7. Should You wish to submit work that is not Your original creation, You may
|
||||
submit it to the Project separately from any Contribution, identifying the
|
||||
complete details of its source and of any license or other restriction
|
||||
(including, but not limited to, related patents, trademarks, and license
|
||||
agreements) of which you are personally aware, and conspicuously marking the
|
||||
work as “Submitted on behalf of a third-party: [named here]”.
|
||||
|
||||
8. You agree to notify the Project of any facts or circumstances of which you
|
||||
become aware that would make these representations inaccurate in any respect.
|
||||
|
||||
\[Please complete and sign on the next page.\]
|
||||
|
||||
::: {style="page-break-after: always; visibility: hidden"}
|
||||
```{=tex}
|
||||
\pagebreak
|
||||
```
|
||||
:::
|
||||
|
||||
Please sign:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
Date: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Full name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Mailing Address:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Country:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
E-Mail:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
@@ -10,8 +10,9 @@ must comply with the terms of this Charter.
|
||||
### 1. Mission and Scope of the Project
|
||||
|
||||
* **a.** The mission of the Project is to develop an open source project
|
||||
with the goals indicated in the "README" file within the Project's code
|
||||
repository.
|
||||
for programmable shading in advanced renderers and other applications,
|
||||
ideal for describing materials, lights, displacement, and pattern
|
||||
generation.
|
||||
|
||||
* **b.** The scope of the Project includes software development under an
|
||||
OSI-approved open source license supporting the mission, including
|
||||
@@ -199,7 +200,7 @@ must comply with the terms of this Charter.
|
||||
|
||||
- **i.** All new inbound code contributions to the Project must be made
|
||||
using the BSD 3-Clause License (available here:
|
||||
https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE)
|
||||
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/LICENSE.md)
|
||||
(the "Project License").
|
||||
|
||||
- **ii.** All new inbound code contributions must:
|
||||
|
||||
@@ -36,7 +36,7 @@ Additional attendees:
|
||||
|
||||
* Charter / legalities
|
||||
- All the proposed documents are in this PR:
|
||||
https://github.com/imageworks/OpenShadingLanguage/pull/1137
|
||||
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1137
|
||||
- **Action**: Everybody please look over the charter, etc., give a +1,
|
||||
raise any objections or ask questions.
|
||||
- **Action**: Look at the CLA, show to your legal depts if they care. It's
|
||||
|
||||
+17
-17
@@ -4,27 +4,27 @@ This is a checklist for TSC's to review as part of the intake process. The TSC s
|
||||
|
||||
- Existing Project Governance
|
||||
- [X] Project License exists ( [LICENSE.md](../LICENSE.md) ) and is OSI-approved
|
||||
- [X] Any third-party components/dependencies included are listed along with thier licenses ( [THIRD_PARTY.md](../THIRD_PARTY.md) )
|
||||
- [X] Governamce defined, outlining community roles and how decsions are made ( [GOVERNANCE.md](../GOVERNANCE.md] )
|
||||
- Closed by https://github.com/imageworks/OpenShadingLanguage/pull/1137
|
||||
- [X] Any third-party components/dependencies included are listed along with their licenses ( [THIRD_PARTY.md](../THIRD_PARTY.md) )
|
||||
- [X] Governance defined, outlining community roles and how decsions are made ( [GOVERNANCE.md](../GOVERNANCE.md] )
|
||||
- Closed by https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1137
|
||||
- [X] Contribution Policy defined ( [CONTRIBUTING.md](../CONTRIBUTING.md) )
|
||||
- Closed by https://github.com/imageworks/OpenShadingLanguage/pull/1137
|
||||
- Closed by https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1137
|
||||
- [X] Code of Conduct defined ( existing or pull from [ASWF Sample Project](https://github.com/AcademySoftwareFoundation/aswf-sample-project/blob/master/CODE_OF_CONDUCT.md) )
|
||||
- Closed by https://github.com/imageworks/OpenShadingLanguage/pull/1137
|
||||
- Closed by https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1137
|
||||
- [ ] Release methodology defined ( [release.md](process/release.md) )
|
||||
- New Project Goverance
|
||||
- New Project Governance
|
||||
- [X] TSC members identified
|
||||
- [X] First TSC meeting held
|
||||
- [X] TSC meeting cadence set and added to project calendar
|
||||
- [ ] CLA Approved ( if used ) ( [CCLA](ccla.md) and [ICLA](icla.md) )
|
||||
- [X] CLA Approved ( if used ) ( [CCLA](CLA-corporate.md) and [ICLA](CLA-individual.md) )
|
||||
- Project charter ( [charter.md](charter.md) )
|
||||
- [X] Approved by TSC
|
||||
- Closed by https://github.com/imageworks/OpenShadingLanguage/pull/1137
|
||||
- [ ] Filed ( create pull request against [foundation repo](https://github.com/AcademySoftwareFoundation/foundation) )
|
||||
- Closed by https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1137
|
||||
- [X] Filed ( create pull request against [foundation repo](https://github.com/AcademySoftwareFoundation/foundation) )
|
||||
- Current tools
|
||||
- [X] Source Control ( https://github.com/imageworks/OpenShadingLanguage )
|
||||
- [X] Issue/feature tracker ( https://github.com/imageworks/OpenShadingLanguage/issues )
|
||||
- Collaboration tools
|
||||
- [X] Source Control ( https://github.com/AcademySoftwareFoundation/OpenShadingLanguage )
|
||||
- [X] Issue/feature tracker ( https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/issues )
|
||||
- Collaboration tools
|
||||
- [X] Mailing lists (old: http://groups.google.com/group/osl-dev )
|
||||
- [X] Move to groups.io ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new ) to setup/transfer
|
||||
- [X] Slack or IRC ( #openshadinglanguage )
|
||||
@@ -36,9 +36,9 @@ This is a checklist for TSC's to review as part of the intake process. The TSC s
|
||||
- Project assets
|
||||
- [X] Domain name
|
||||
- [X] Logo(s) ( https://github.com/AcademySoftwareFoundation/artwork/blob/master/examples/incubating.md#open-shading-language-logos )
|
||||
- [ ] Trademarks/mark ownership rights ( John to follow up with Larry on this )
|
||||
- [X] Trademarks/mark ownership rights
|
||||
- Outreach
|
||||
- [X] New project annoucement done ( https://www.aswf.io/osl-joins-aswf/ )
|
||||
- [X] New project announcement done ( https://www.aswf.io/osl-joins-aswf/ )
|
||||
- [X] Project added to ASWF website and ASWF landscape
|
||||
- Graduation
|
||||
- [ ] CII Badge achieved
|
||||
@@ -48,6 +48,6 @@ This is a checklist for TSC's to review as part of the intake process. The TSC s
|
||||
- [X] TAC representative appointed
|
||||
- Chris Kulla, TSC chair, is our TAC rep for the project
|
||||
- [X] License scan completed and no issues found
|
||||
- Minor issues were found but already fixed in PR https://github.com/imageworks/OpenShadingLanguage/pull/1145
|
||||
- [ ] Code repository imported to ASWF GitHub organization
|
||||
- [ ] Developer Certificate of Origin past commit signoff done and DCO Probot enabled.
|
||||
- Minor issues were found but already fixed in PR https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1145
|
||||
- [X] Code repository imported to ASWF GitHub organization
|
||||
- [X] Developer Certificate of Origin post commit signoff done and DCO Probot enabled.
|
||||
|
||||
+578
-56
@@ -1,7 +1,515 @@
|
||||
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
||||
<!-- Copyright Contributors to the Open Shading Language Project. -->
|
||||
|
||||
Release 1.11 --1 Sept 2020 (compared to 1.10)
|
||||
Release 1.13 -- ?? 2023 ?? (compared to 1.12)
|
||||
--------------------------------------------------
|
||||
Dependency and standards requirements changes:
|
||||
* OptiX 6.0 support has been removed. For GPU rendering with OptiX, a minimum
|
||||
of OptiX 7.0 is required.
|
||||
* The minimum version OpenImageIO has been raised from 2.2 to 2.3. #1591
|
||||
(1.13.0.3)
|
||||
|
||||
OSL Language and oslc compiler:
|
||||
* Bug fix: shader params whose default values involve "init ops" could be
|
||||
incorrectly initialized if their values came from instance parameters set to
|
||||
zero. #1578 (1.13.0.2)
|
||||
|
||||
OSL Standard library:
|
||||
|
||||
API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
* A new `shadingStateUniform` pointer field was added to ShaderGlobals for
|
||||
planned future expansion and improved GPU support. #1585 (1.13.1.0)
|
||||
|
||||
SIMD batched shading mode:
|
||||
* Fix some array overruns (asymptomatic, but still potentially buggy) in
|
||||
common_ancestor_between. #1577 (1.13.0.2)
|
||||
|
||||
OptiX rendering:
|
||||
* OptiX 6.0 support has been removed. For GPU rendering with OptiX, a minimum
|
||||
of OptiX 7.0 is required.
|
||||
* Big overhaul/simplification of how strings are represented on the GPU: the
|
||||
extra level of indirection to global variables is removed, and strings are
|
||||
simply represented in ordinary variables as the hash of their characters.
|
||||
#1531 (1.13.0.0) #1553 (1.13.0.1)
|
||||
* Better PTX cache hit rate by eliminating several sources of not being
|
||||
strictly deterministic in the PTX text we were generating. #1566 #1570
|
||||
(1.13.0.1)
|
||||
|
||||
Performance improvements:
|
||||
|
||||
Bug fixes and other improvements (internals):
|
||||
* Fix memory leak in oslc ASTvariable_declaration. #1576 (1.13.0.2)
|
||||
* Fix memory leaks in LPE code in error conditions. #1593 #1594 (1.13.0.3)
|
||||
|
||||
Internals/developer concerns:
|
||||
* platform.h:
|
||||
- New `OSL_ALLOCA` macro to allocate on the stack. #1589 (1.13.0.3)
|
||||
|
||||
Build & test system improvements:
|
||||
* CMake build system and scripts:
|
||||
- The version number is now a cache variable, and so can be overridden at
|
||||
build time using `-DOSL_VERSION=...`. Use with extreme caution! #1579
|
||||
(1.13.0.2)
|
||||
* Dependency version support:
|
||||
- Fix some issues that came up with the new icx 2022.0 compiler. #1601
|
||||
(1.13.1.0)
|
||||
* Testing and Continuous integration (CI) systems:
|
||||
- Dynamic analysis using address and leak sanitizers. #1581 (1.13.0.3)
|
||||
- `testshade --help` now prints TextureSystem options and all hardware
|
||||
information. #1584 (1.13.0.3)
|
||||
- Improvements to SonarCloud and coverage analysis. #1596 (1.13.0.3)
|
||||
* Platform support:
|
||||
|
||||
Documentation:
|
||||
* `doc/RELEASING.md` documents our release process and versioning policies.
|
||||
#1572 (1.13.0.2)
|
||||
|
||||
|
||||
Release 1.12 -- 1 Oct 2022 (compared to 1.11)
|
||||
----------------------------------------------
|
||||
Big Deal Changes:
|
||||
* **Batch shading**: A fully operational "batch shading" support when using
|
||||
CPUs supporting the Intel AVX2 or AVX512 instruction set architectures,
|
||||
allows shading 8 or 16 points at a time, accelerated by using SIMD
|
||||
instructions. (Changes contributed by Intel.)
|
||||
* **OptiX**: A reasonable subset of the OSL language can run on NVIDIA GPUs
|
||||
for Cuda or OptiX-based renderers.
|
||||
* **Standardized material closures**: Synchronize with MaterialX on a minimum
|
||||
standard set of material closures. This is reflected in both the OSL spec as
|
||||
well as reference implementations of those closures in testrender. #1533
|
||||
#1536 #1537 #1538 #1539 #1541 #1542 #1547 #1557
|
||||
|
||||
Dependency and standards requirements changes:
|
||||
* The minimum (and default) compilation mode is now C++14. C++17 and 20 are
|
||||
also supported. #1362 #1369 (1.12.2)
|
||||
* Minimum compilers are now gcc 6.1 (no more support for gcc 4.8), MSVS
|
||||
2017 or newer (no more support for 2015).
|
||||
* Minimum LLVM is now 9.0. Support for LLVM 7 and 8 have ben dropped.
|
||||
#1441 (1.12.3)
|
||||
* Minimum OpenImageIO is now 2.2: Support for OIIO 2.0 and 2.1 have been
|
||||
dropped. #1426 (1.12.3)
|
||||
* Minimum OpenEXR version is now 2.3 (raised from 2.0). #1406 (1.12.3)
|
||||
|
||||
OSL Language and oslc compiler:
|
||||
* `#pragma error "message"` and `#pragma warning "message"` can be used to
|
||||
conditionally inject a compile-time error or warning. #1300 (1.12.1)
|
||||
* Check for errors when when writing oso files (for example, disk volume
|
||||
full). #1360 (1.12.2/1.11.14)
|
||||
* A new flavor of `gettextureinfo(texturename, paramname, s, t, destination)`
|
||||
allows for querying of texture metadata about the particular UDIM tile
|
||||
that will be used for particular (s,t) texture coordinates. #1398 (1.12.3)
|
||||
* Better error detection when OSL user functions write to function parameters
|
||||
that are not marked as output. #1417 (1.12.3)
|
||||
* Detect and better error message when using a type name where a variable
|
||||
identifier should be. #1457 (1.12.4.2)
|
||||
|
||||
OSL Standard library:
|
||||
* vector2.h is updated with a mod() function for vector2. #1312 (1.12.1/1.11.12)
|
||||
* Preliminary work for adding standard MaterialX closures. 31371 (1.12.2)
|
||||
* Fix previously-broken color conversions from RGB to xyY. #1410 (1.12.3)
|
||||
* Fully removed MaterialX shaders (get those from the MaterialX project).
|
||||
#1450 (1.12.3)
|
||||
* Fix incorrect implementation of `matrix4 * vector4` in vector4.h #1513
|
||||
(1.12.5.0)
|
||||
|
||||
API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
* Custom experimental llvm optimization levels 10, 11, 12, and 13. These
|
||||
are stripped down versions of 0, 1, 2, 3 (corresponding to clang's -O0,
|
||||
-O1, -O2, -O3) but we think for shaders are just as performant but with
|
||||
lower JIT time. These are currently experimental, but we are benchmarking
|
||||
to determine if they should be the new defaults. #1250 (1.12.0.0)
|
||||
* ShadingSystem attribute "searchpath:library" gives a searchpath for finding
|
||||
runtime-loadable implementation modules for ISA-optimized operations.
|
||||
#1310 (1.12.1)
|
||||
* Output variable placement -- now you can designate where shader outputs
|
||||
should go and the shader will put results there, instead of the app using
|
||||
find_symbol() and symbol_address after the shader is executed. #1328 (1.12.2)
|
||||
* Userdata input placement -- now you can designate where interpolated
|
||||
userdata should be copied from directly, rather then via callbacks to
|
||||
RendererServices::get_userdata(). #1391 (1.12.3)
|
||||
* Better hiding of the Matrix22 class, which was never actually part of the
|
||||
public APIs. #1480 (1.12.4.5)
|
||||
* Add ACES2065-1 and ACEScg as shading system color spaces (#1486) (1.12.4.6)
|
||||
* Expanded warnings (via enabling the "opt_warnings" attribute of the
|
||||
ShadingSystem) for operations that try to create new strings mid-shader, or
|
||||
that need to access the characters of strings mid-shader. These are only
|
||||
triggered for those cases that cannot be resolved by the end of the "runtime
|
||||
optimization" phase. #1497 (1.12.4.6)
|
||||
|
||||
SIMD batched shading mode:
|
||||
* Added support for masked operations to LLVMUtil. #1248 #1250 (1.12.0.0)
|
||||
* Add interface to ShadingSystem for batched execution. #1272 (1.12.0.1)
|
||||
* Add interface to batched RendererServices. #1276 (1.12.0.1)
|
||||
* Batched testshade. #1298 (1.12.1)
|
||||
* ShadingSystem plumbing to support batched execution. #1301 (1.12.1)
|
||||
* Batched analysis to figure out which symbols need to be varying or uniform,
|
||||
and which operations require masking. #1313 #1318 #1322 (1.12.1)
|
||||
* Additional infrastructure for batched analysis. #1316 (1.12.1)
|
||||
* Add implementation for BatchedBackendLLVM. #1330 (1.12.1)
|
||||
* ISA-specific modules. #1345 (1.12.2)
|
||||
* Introduction of CI testing of batched mode. #1357 #1367 (1.12.2)
|
||||
* Control flow and string ops. #1372 (1.12.2)
|
||||
* Matrix operations. #1378 (1.12.2) #1485 (1.12.4.6)
|
||||
* Batched algebraic, trig, and transcendental functions. #1385 (1.12.2)
|
||||
* Batched noise. #1394 (1.12.3)
|
||||
* Batched implementation of all color operations. #1408 (1.12.3)
|
||||
* Batched bitwise ops. #1413 (1.12.3)
|
||||
* Batched spline and spline inverse. #1422 (1.12.3)
|
||||
* Batched texture, gettextureinfo, texture3d, environment. #1436 (1.12.3)
|
||||
* Batched dictionary functionality (dict_find, etc.) #1445 (1.12.3)
|
||||
* Enable batched execution of most testsuite. #1453 (1.12.4.1)
|
||||
* Batched isnan, isinf, isfinite. #1456 (1.12.4.2)
|
||||
* Batched userdata and output placement. #1455 (1.12.4.2)
|
||||
* Batched pointcloud functions. #1464 (1.12.4.4)
|
||||
* Batched closures (#1500)
|
||||
|
||||
OptiX rendering:
|
||||
* Explicitly set the OptiX pipeline stack size. #1254 (1.12.0.0)
|
||||
* CI tests now at least compile and build with USE_OPTIX=1 (though not yet
|
||||
run the tests). #1281 (1.12.0.1)
|
||||
* A simple self-contained Cuda/OptiX example has been added as
|
||||
testsuite/example-cuda. #1280 (1.12.0.1)
|
||||
* Overhaul in how strings are communicated to the GPU side. #1309 (1.12.1)
|
||||
* Removal of runtime compilation of Cuda (libnvrtc dependency eliminated).
|
||||
#1309 (1.12.1)
|
||||
* Fix problems with unresolved symbols on GPU, particularly when multiple
|
||||
shaders call certain functions like printf. #1401 (1.12.3)
|
||||
* Changed prototype of osl_get_attribute callback to work properly on
|
||||
GPU. #1404 (1.12.3)
|
||||
* Fix missing hostdevice modifier on some matrix operators. #1409 (1.12.3)
|
||||
* Fix race conditions when compiling for OptiX 7. #1411 (1.12.3)
|
||||
* osl_get_attribute() uses device strings when compiling for OptiX.
|
||||
#1435 (1.12.3)
|
||||
* Fix issue with OptiX + clang 14 with duplicate symbols. #1561 (1.12.6.0)
|
||||
|
||||
Performance improvements:
|
||||
* Less mutex locking around use and retrieval of ColorSystem related to
|
||||
doing color transforms. #1405 (1.12.3)
|
||||
* Constant folding of `startswith()`. #1507 (1.12.5.0)
|
||||
|
||||
Bug fixes and other improvements (internals):
|
||||
* Fix derivatives of texture calls when only derivatives of the "alpha"
|
||||
value are needed. #1251 (1.12.0.0)
|
||||
* When uninitialized value detection is used, fix possible "false positive"
|
||||
related to the condition variable of do-while loops. #1252 (1.12.0.0)
|
||||
* Avoid some pointless copies of output variables from a used layer to a
|
||||
downstream layer that is known to not be used. #1253 (1.12.0.0)
|
||||
* Stats now print more information about build options and runtime hardware
|
||||
capabilities. #1258 #1259 (1.12.0.1)
|
||||
* The osl and oso parsers are now re-entrant, which allows different threads
|
||||
to concurrently compile or load shaders. #969 (1.12.0.1)
|
||||
* Fix asymptomatic potential runtime optimizer bug where certain
|
||||
multi-component values were not correctly recognized as nonzero. #1266
|
||||
(1.12.0.1/1.11.9)
|
||||
* Fix optimizer bug where an `output` parameter that is also marked as
|
||||
`[[lockgeom=0]]`, i.e., it gets a value from a userdata input, but also
|
||||
passes it to a downstream connection or a renderer output, could end up
|
||||
with an incorrect value if it was never read in the shader (including if
|
||||
the only times it was read were optimized away). #1295 (1.12.0.1)
|
||||
* Ensure that OSLCompiler::LoadMemoryCompiledShader returns false upon parse
|
||||
failure. #1302 (1.12.1/1.11.10)
|
||||
* During runtime optimization, don't merge layers that produce renderer
|
||||
outputs (the semantics of doing so are very fishy). #1296 (1.12.1)
|
||||
* Eliminate unnecessary error messages to stderr for broken point clouds.
|
||||
#1333 (1.12.1/1.11.13)
|
||||
* Fix undefined behavior that could result in crashes that resulted from
|
||||
the Symbol class having no virtual destructor. #1397 (1.12.3)
|
||||
* Fix in runtime optimizer where tracking of messages and unknown messages
|
||||
relied on uninitialized variables. #1447 (1.11.17/1.12.3)
|
||||
* Stop internally using OIIO::string_view::c_str(), which will someday be
|
||||
removed. #1458 (1.12.4.2)
|
||||
* Correctly track that the backfacing() function requires N and I shader
|
||||
globals. #1462 (1.12.4.4)
|
||||
* Print all 4 levels of version numbers in help messages. #1477 (1.12.4.4)
|
||||
* Fix GPU code generation crash. #1479 (1.12.4.4)
|
||||
* Work to transition internals to use modern std::format notation for
|
||||
formatted output. #1487 #1490 (1.12.4.6) #1504 #1506 (1.12.5.0)
|
||||
* testrender improvements:
|
||||
* Fix testrender memory error on teardown. #1499 (1.12.4.6)
|
||||
* Modernize the sampler in testrender, improving quality and performance.
|
||||
#1534 (1.12.6.0)
|
||||
* Switch to cone tracing for derivatives. #1543 (1.12.6.0)
|
||||
* Fix error that prevented correct typecheck of ternary operator. #1552
|
||||
(1.12.6.0)
|
||||
|
||||
Internals/developer concerns:
|
||||
* Use the `final` keyword in certain internal classes where applicable.
|
||||
#1260 (1.12.0.1/1.11.9)
|
||||
* Minor fixes to the internal TypeSpec and Symbol classes. #1267 (1.12.0.1)
|
||||
* Switch from deprecated call to OIIO::parallel_image to the new version.
|
||||
#1317 (1.11.11/1.12.1)
|
||||
* The "archive_groupname" handling is now careful to sanitize the filenames
|
||||
it deals with, closing some security and safety holes. #1383 (1.12.2)
|
||||
* More migration of string formatting to new std::format style. #1389 (1.12.3)
|
||||
#1469 #1470 (1.12.4.4)
|
||||
* llvm_util: Switch some uses of ptr+len to span. #1390 (1.12.3)
|
||||
* OSL no longer uses sscanf internally (which has icky locale-dependent
|
||||
behavior), and instead use locale-independent OIIO::Strutil utilities
|
||||
whenever we need to parse strings. #1432 (1.12.3)
|
||||
* Avoid use of OIIO::string_view::str() which is not corresponding to the
|
||||
official C++17 std::string_view. #1467 (1.12.4.4)
|
||||
* Prototype of "free function" approach that will someday mostly supplant
|
||||
the way we use RendererServices, and will help to unlock feature completion
|
||||
for GPU and other back ends. This experimental feature is not expected
|
||||
to be used in OSL 1.12. #1494 (1.12.5.0)
|
||||
* Work on gradually converting printf-style formatted strings to fmt /
|
||||
std::format style. #1493 (1.12.5.0)
|
||||
* LLVM_Util: allow naming of llvm symbols to help with IR debugging. #1530
|
||||
(1.12.6.0)
|
||||
* clang-format the code base. #1508 #1509 #1511 #1512 #1515 #1518 #1540
|
||||
(1.12.5.0) #1555 #1562 #1568 (1.12.6.0)
|
||||
* A round of spell-checking all the comments in the code base. #1550
|
||||
(1.12.5.0)
|
||||
|
||||
Build & test system improvements:
|
||||
* CMake build system and scripts:
|
||||
- We now use .git-blame-ignore-revs to record commits that consist
|
||||
entirely of reformatting, so that 'git blame' does not misattribute
|
||||
authorship to the trivial changes of those commits. #1244 (1.12.0.0)
|
||||
- Miscellaneous improvements to cmake scripts. #1247 (1.12.0.0)
|
||||
- Instead of defaulting to looking for Python 2.7, the OSL build now
|
||||
defaults to whatever Python is found (though a specific one can still
|
||||
be requested via the PYTHON_VERSION variable). #1249 (1.12.0.0/1.11.8)
|
||||
#1286 (1.12.0.1/1.11.9)
|
||||
- Extend checked_find_package with VERSION_MIN and VERSION_MAX. #1303
|
||||
(1.12.1/1.11.10)
|
||||
- Make the CMake build scripts more friendly to being a subproject.
|
||||
#1304 #1319 (1.11.11/1.12.1)
|
||||
- We weren't properly hiding non-public symbols. #1337 (1.12.1/1.11.12)
|
||||
- Fully split oslquery and oslnoise libraries from oslexec, no more
|
||||
redundant modules put into both. #1346 #1348 (1.12.1)
|
||||
- Support for CMake 3.20 #1354 (1.12.2/1.11.14)
|
||||
- Important change to `Makefile` wrapper: We have a 'Makefile' that just
|
||||
wraps cmake for ease of use. This has changed its practice of putting
|
||||
builds in `build/ARCH` to just `build` (and local installs from
|
||||
`dist/ARCH` to `dist`) to better match common cmake practice. So where
|
||||
your local builds end up may shift a bit. #1396 (1.12.3)
|
||||
- Be more careful about not writing over a sensitive install area
|
||||
unless CMAKE_INSTALL_PREFIX is explicitly set. #1421 (1.12.3)
|
||||
- PROJECT_VERSION_RELEASE_TYPE and OSL_SUPPORTED_RELEASE are now
|
||||
cache variables that can have build-time overrides. #1443 (1.12.3)
|
||||
- Use PROJECT_IS_TOP_LEVEL (not OSL_IS_SUBPROJECT) to confirm with
|
||||
CMake 21 conventions. #1443 (1.12.3)
|
||||
- New TIME_COMMANDS option, when enabled, can help debug performance of
|
||||
the build. #1443 (1.12.3)
|
||||
- New CMake variable `DOWNSTREAM_CXX_STANDARD` sets the downstream
|
||||
minimum C++ requirement, separately from `CMAKE_CXX_STANDARD` which sets
|
||||
what we build OSL itself with. Clarify that currently, OSL can be used
|
||||
downstream by C++14, even if it is built with C++17 or higher. #1454
|
||||
(1.12.4.1)
|
||||
- Make exported cmake configs relocatable by using relative paths. #1466
|
||||
(1.12.4.4)
|
||||
* Dependency version support:
|
||||
- Build properly against Cuda 11 and OptiX 7.1. #1232 (1.12.0.1)
|
||||
and up to OptiX 7.4 #1559 (1.12.6.0)
|
||||
- PugiXML build fixes on some systems. #1262 (1.12.0.1/1.11.8)
|
||||
- Cuda/OptiX back end: Add `__CUDADEVRT_INTERNAL__` define to bitcode
|
||||
generation, needed to avoid duplicate cudaMalloc symbols with CUDA9+
|
||||
#1271 (1.12.0.1)
|
||||
- Build against LLVM 11 #1274 (1.12.0.1), LLVM 12 #1351 (1.12.1.0)
|
||||
#1412 (1.12.3), LLVM 13 #1420 (1.12.3), LLVM 14 #1492 (1.12.4.6)
|
||||
LLVM 15 #1592 (1.12.6.2)
|
||||
- Fix build break against recent OIIO master change where m_mutex field
|
||||
was removed from ImageInput. #1281 (1.12.0.1/1.11.9)
|
||||
- Work to ensure that OIIO will build correctly against the upcoming
|
||||
Imath 3.0 and OpenEXR 3.0. #1299 (1.11.10/1.12.1) #1332 (1.11.11/1.12.1)
|
||||
#1341 (1.11.12/1.12.1) #1356 #1368 (1.11.13/1.12.2) #1489 (1.12.4.6)
|
||||
- Improved finding of llvm components when using static libraries. #1375
|
||||
(1.12.2)
|
||||
- No longer use boost regex, completely rely on std::regex now that OSL
|
||||
is C++14 minimum. #1377. (1.12.2)
|
||||
- Support for OpenImageIO 2.3 changes. #1393 (1.12.3)
|
||||
- Some rearrangement of `#include` and other trickery ensures that OSL
|
||||
always includes headers from its favored version of Imath, rather than
|
||||
the ones that OIIO prefers (in cases where OIIO and OSL were each based
|
||||
on different Imath versions). #1460 (1.12.4.2)
|
||||
- Various fixes for functionality and warnings for Intel icc and icx
|
||||
compilers. #1459 #1473 #1475. (1.12.4.4)
|
||||
- Fixes for recent OIIO TextureSystem changes that hide Imath types.
|
||||
#1476 (1.12.4.4)
|
||||
- Changes to work correctly with OpenImageIO 2.4 and its master being
|
||||
the start of 2.5. #1569 (1.12.6.0)
|
||||
* Testing and Continuous integration (CI) systems:
|
||||
- Eliminate the old Travis CI and Appveyor. #1334 #1338 (1.12.1)
|
||||
- Use ccache + GitHub 'cache' action to greatly speed up CI runs. #1335
|
||||
(1.12.1)
|
||||
- Divide the CI stages into separate steps, combine dependency-building
|
||||
scripts for CentOS and Ubuntu ito a single script. #1338 (1.12.1)
|
||||
- CI tests clang11, also batched shading with clang. #1379 (1.12.2)
|
||||
- CI speeds up OIIO builds by not building its tests. #1380 (1.12.2)
|
||||
- CI tests gcc11 #1381 (1.12.2) and gcc12 #1565 (1.12.6)
|
||||
- Deal with OpenColorIO changing its master branch to "main". #1429
|
||||
(1.12.3)
|
||||
- Fix tests for texture3d now that OIIO has dropped support for Field3D.
|
||||
#1437 (1.12.3)
|
||||
- Test against LLVM13/clang13 for the VFX Platform 2022 tests. #1434
|
||||
(1.12.3)
|
||||
- CI test against MacOS-11 #1434 (1.12.3) and MacOS-12 #1554 (1.12.6)
|
||||
#1522 (1.12.5)
|
||||
- Add testsuite coverage of environment(). #1438 (1.12.3)
|
||||
- Use a project-specific environment variable `OSL_CI` instead of the more
|
||||
generic `CI` to avoid clashes with other systems. #1446 (1.12.3)
|
||||
- Deal with OpenEXR and Imath changing its master branch to "main". #1463
|
||||
(1.12.4.4)
|
||||
- testrender fix sphere tangents, per MaterialX suggestion. #1465
|
||||
(1.12.4.4)
|
||||
- Allow testsuite tests to use oiiotool for image diffs instead of idiff.
|
||||
#1472 (1.12.4.4)
|
||||
- Allow `-Werror` to be disabled even on CI branches. #1471 (1.12.4.4)
|
||||
- CI Tests against the Intel icc and icx compilers! #1459 #1473 (1.12.4.4)
|
||||
#1501 (1.12.5.0)
|
||||
- Overhaul of GHA ci.yml to use strategy matrix. #1474 (1.12.4.4)
|
||||
- Test against clang 14 and fix new warnings. #1498 (1.12.5.0)
|
||||
- Test against clang 15 and fix new warnings. #1586 (1.12.6.2)
|
||||
- A scorecards workflow guards against a variety of security issues of
|
||||
the CI system itself. #1529 (1.12.6.0)
|
||||
- Enable SonarCloud static analysis. #1551 #1556 #1563 (1.12.6.0)
|
||||
* Platform support:
|
||||
- Various Windows compile fixes. #1263 #1285 (1.12.0.1)
|
||||
- Windows+Cuda build fixes. #1292 (1.12.0.1)
|
||||
- Fix warnings about pointer casts on Windows. #1484 (1.12.4.5)
|
||||
- Various Windows build fixes. #1502 (1.12.5.0)
|
||||
* The oso and osl lexers/parsers are now given internal symbol names that
|
||||
are fully versioned, to avoid possible clash if multiple OSL releases are
|
||||
both linked into the same application. #1255 (1.12.0.0)
|
||||
|
||||
Documentation:
|
||||
* A simple self-contained Cuda/OptiX example has been added as
|
||||
testsuite/example-cuda. #1280 (1.12.0.1)
|
||||
* Update CLAs, Charter, GOVERNANCE, particularly after acceptance of new
|
||||
CLAs and moving the repo to the ASWF GitHub account. #1308 #1240 #1314
|
||||
(1.11.11/1.12.1)
|
||||
* First steps in new documentation and scripts for building OSL on Windows.
|
||||
#1326 (1.12.1)
|
||||
* Fix missing explanation of the optional "errormessage" parameter to
|
||||
environment() and texture3d(). #1442 (1.12.3/1.11.17)
|
||||
* A SECURITY.md file explains how to confidentially report vulnerabilities.
|
||||
#1529 (1.12.6)
|
||||
* Document all the new MaterialX closures. #1564
|
||||
|
||||
|
||||
|
||||
Release 1.11.17.0 -- 7 Jan 2022 (compared to 1.11.16.0)
|
||||
-------------------------------------------------------
|
||||
* Fix in runtime optimizer where tracking of messages and unknown messages
|
||||
relied on uninitialized variables. #1447
|
||||
* Minor changes related to OpenColorIO changing their master branch name to
|
||||
"main". #1431
|
||||
* Testing: Get texture3d tests operational again. #1437
|
||||
* Docs: Fix missing "errormessage" explanation for environment() and
|
||||
texture3d(). #1442
|
||||
* Build/cmake fixes: Make PROJECT_VERSION_RELEASE_TYPE and
|
||||
OSL_SUPPORTED_RELEASE be cache strings, so they can be overridden; change
|
||||
OSL_IS_SUBPROJECT to PROJECT_IS_TOP_LEVEL (and change its sense) to match
|
||||
CMake 21+ behavior; add a TIME_COMMANDS option to help debug performance of
|
||||
the build. #1443
|
||||
|
||||
Release 1.11.16.0 -- 1 Nov 2021 (compared to 1.11.15.0)
|
||||
-------------------------------------------------------
|
||||
* Fixes to work with LLVM 13, and to compile with clang 13. #1412 #1420
|
||||
|
||||
Release 1.11.15.0 -- 1 Sep 2021 (compared to 1.11.14.2)
|
||||
-------------------------------------------------------
|
||||
* Changes for compatibility with OpenImageIO 2.3. #1393 #1388
|
||||
* Fix potential crashes (or at least undefined behavior) due to missing
|
||||
virtual destructor of internal Symbol type. #1397
|
||||
|
||||
Release 1.11.14.2 -- 1 Jul 2021 (compared to 1.11.14.1)
|
||||
-------------------------------------------------------
|
||||
* Fix warnings that occur when compiling with clang and C++17 mode. #1379
|
||||
* CI/testing: Additional CI tests for clang+c++17 (#1379), gcc11 (#1381),
|
||||
llvm 12 (#1381), speed up CI builds by not building the testing components
|
||||
of OIIO (#1380).
|
||||
|
||||
Release 1.11.14.1 -- 1 Jun 2021 (compared to 1.11.14.0)
|
||||
-------------------------------------------------------
|
||||
* Fix library setup for LLVM installations consisting of static libraries.
|
||||
This fixes a build problem that can crop up on MacOS using
|
||||
Homebrew-installed LLVM 12. #1375
|
||||
|
||||
Release 1.11.14 -- 10 May 2021 (compared to 1.11.13)
|
||||
----------------------------------------------------
|
||||
* oslc/OSLCompiler: Check for errors when when writing oso (for example,
|
||||
disk volume full). #1360
|
||||
* Fix crash generating closure function calls with LLVM 11. #1361
|
||||
* Build: LLVM 12 compatibility. #1351
|
||||
* Build: Support for CMake 3.20 #1354
|
||||
* Build: Be robust to certain OpenEXR 2.x config fies. #1356
|
||||
* Build: Fixes to deal with newer OIIO builds that are C++14.
|
||||
|
||||
Release 1.11.13 -- 1 Apr 2021 (compared to 1.11.12)
|
||||
----------------------------------------------------
|
||||
* Updated vector2.h with a `mod(vector2,vector2)` function. #1312
|
||||
* Fix unnecesary error messages to stderr when encountering broken point
|
||||
clouds. #1333
|
||||
|
||||
Release 1.11.12 -- 1 Mar 2021 (compared to 1.11.11)
|
||||
----------------------------------------------------
|
||||
* Build: Changes for smooth compile against upcoming Imath 3.0. #1332 #1341
|
||||
* Build: We weren't properly hiding non-public symbols. #1337
|
||||
* CI: Cleanup and get rid of the last Travis vestiges. #1334
|
||||
* CI: Speed up CI runs by using GHA cache + ccache. #1335
|
||||
* CI: Separate CI process into several individual "steps." #1338
|
||||
|
||||
Release 1.11.11 -- 1 Feb 2021 (compared to 1.11.10)
|
||||
----------------------------------------------------
|
||||
* Build: Make the CMake build system more friendly to being a subproject.
|
||||
#1304
|
||||
* Build: Improve dependency on Imath/OpenEXR include files.
|
||||
* CI: Fixes to Mac CI. #1315
|
||||
* Docs: Update CLAs, Charter, GOVERNANCE, particularly after acceptance of
|
||||
new CLAs and moving the repo to the ASWF GitHub account. #1308 #1240 #1314
|
||||
* Internals: Switch from deprecated call to OIIO::parallel_image to the new
|
||||
version. #1317
|
||||
|
||||
Release 1.11.10 -- 1 Dec 2020 (compared to 1.11.9)
|
||||
---------------------------------------------------
|
||||
* Bug fix: optimizer interaction with output param that also is userdata.
|
||||
#1295
|
||||
* Ensure that LoadMemoryCompiledShader returns false upon parse failure.
|
||||
#1302
|
||||
* Work to ensure that OIIO will build correctly against the upcoming
|
||||
Imath 3.0 and OpenEXR 3.0. #1299
|
||||
|
||||
Release 1.11.9 -- 1 Nov 2020 (compared to 1.11.8)
|
||||
---------------------------------------------------
|
||||
* Build properly against Cuda 11 and OptiX 7.1. #1232
|
||||
* Windows compile fixes. #1263 #1285
|
||||
* PugiXML build fixes on some systems. #1262
|
||||
* Fix asymptomatic potential runtime optimizer bug where certain
|
||||
multi-component values were not correctly recognized as nonzero. #1266
|
||||
* Fix false positive with "debug_uninit" where certain while loops might be
|
||||
flagged as using uninitialized values when in fact they were not. #1252
|
||||
* Slightly optimize by not copying output params to layers that will not be
|
||||
used. #1253
|
||||
* Internals: use the `final` keyword in certain internal classes where
|
||||
applicable. #1260
|
||||
* Cuda/OptiX back end: Add `__CUDADEVRT_INTERNAL__` define to bitcode
|
||||
generation, needed to avoid duplicate cudaMalloc symbols with CUDA9+ #1271
|
||||
* Fix build break against recent OIIO master change where m_mutex field was
|
||||
removed from ImageInput. #1281
|
||||
|
||||
Release 1.11.8 -- 1 Oct 2020 (compared to 1.11.7)
|
||||
---------------------------------------------------
|
||||
* Fix broken derivatives of the optional "alpha" return of texture calls
|
||||
when the normal color channels return don't have their derivatives used
|
||||
but the alpha does. #1258
|
||||
* Building vs Python: instead of defaulting to searching for python 2.7
|
||||
specifically and needing to set PYTHON_VERSION if you want (or have) a
|
||||
different one, default to whichever version is found. If multiple versions
|
||||
of Python are on the system, you can still use the PYTHON_VERSION cmake
|
||||
variable to disambiguate which one you want. #1249
|
||||
* For the experimental OptiX support, explicitly set the OptiX pipeline
|
||||
stack size (fixes some bugs). #1254
|
||||
* ShadingSystem statistics output (which is printed with `testshade --help`,
|
||||
by the way) now includes information about the SIMD capabilities specified
|
||||
at OSL build time, those available at runtime, and the versions of LLVM,
|
||||
OIIO, and Imath used. This should help in debugging and issue reporting
|
||||
by making it easy to know certain build time choices just by running
|
||||
testshade. #1258
|
||||
|
||||
|
||||
Release 1.11 -- 1 Sept 2020 (compared to 1.10)
|
||||
--------------------------------------------------
|
||||
ASWF adoption changes:
|
||||
* GOVERNANCE.md and ASWF/Technical-Charter.md document the project
|
||||
@@ -107,8 +615,6 @@ OSL Standard library:
|
||||
color spaces. #1013 (1.11.0)
|
||||
* `cbrt()` cube root was added to the standard library. #1164 #1166 (1.11.6)
|
||||
|
||||
Shaders:
|
||||
|
||||
API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
* `ShadingSystem::convert_value()` will now allow promotion of int or
|
||||
float to `float[4]`. #940 (1.11.0)
|
||||
@@ -148,11 +654,14 @@ API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
system attribute) now defaults to 1, not 0. That should be the best
|
||||
performance while still having reasonable JIT times. #1114 (1.11.4)
|
||||
* We no longer automatically build the MaterialX shaders (you need to set
|
||||
build option OSL_BUILD_MATRIALX to ON). This will eventually be deprecated
|
||||
build option OSL_BUILD_MATERIALX to ON). This will eventually be deprecated
|
||||
entirely. #1136 (1.11.5)
|
||||
* Helper varieties of ShadingSystem::Parameter() and ReParameter() that
|
||||
handle the common cases of a single float, int, or string. #1195 #1196
|
||||
(1.11.6)
|
||||
* `ShaingSystem::optimize_group()` now takes an optional parameter that
|
||||
allows the caller to only do the optimize step without the JIT step.
|
||||
#1226 (1.11.71)
|
||||
|
||||
Continued work on experimental SIMD batched shading mode:
|
||||
* Continued work on SIMD-friendly math and noise: #1108 (1.11.4)
|
||||
@@ -173,7 +682,7 @@ Continued work on experimental OptiX rendering:
|
||||
* Work on matrix ops. #1054 (1.11.1)
|
||||
* Allow init ops. #1059 (1.11.1)
|
||||
* Fixes to string closure params. #1061 (1.11.1)
|
||||
# Add support for OptiX 7 #1111 #1203 (1.11.6)
|
||||
* Add support for OptiX 7 #1111 #1203 (1.11.6)
|
||||
|
||||
Performance improvements:
|
||||
* Constant fold array accesses even if they are out of bounds. #1035 (1.11.0)
|
||||
@@ -185,8 +694,10 @@ Performance improvements:
|
||||
* Range checking of matrix component access is skipped for certain cases
|
||||
where it was unnecessary. #1174 (1.11.6)
|
||||
* LLVM JIT+optimize time has been sped up around 10% by doing a better job
|
||||
of pruning unused functions and symbols in the generated modul. #1172
|
||||
of pruning unused functions and symbols in the generated module. #1172
|
||||
(1.11.6)
|
||||
* `ShadingSystem::symbol_address()` no longer checks for the symbol to be
|
||||
NULL (though it will assert on a debug build). #1237 (1.11.7.1)
|
||||
|
||||
Bug fixes and other improvements (internals):
|
||||
* Fix bug in implementation of `splineinverse()` when computing with
|
||||
@@ -229,13 +740,13 @@ Bug fixes and other improvements (internals):
|
||||
Internals/developer concerns:
|
||||
* Switch much of the internals where we do string formatting using printf-like
|
||||
conventions to errorf(), etc., naming convention, reserving the non-f
|
||||
names for future use with C++20 std::format/python convenetions. #1076
|
||||
names for future use with C++20 std::format/python conventions. #1076
|
||||
(1.11.3)
|
||||
* Remove pointless assertions from the TypeSpec class. #1079
|
||||
* Assertion overhaul: use OSL_ASSERT/OSL_DASSERT instead of borrowing from
|
||||
OIIO's dassert.h. Note that OSL_ASSERT always tests, prints error if the
|
||||
test fails, but then only aborts for debug builds (no abort for release
|
||||
builds). In ocntrast, OSL_DASSERT does all for debug builds, and none
|
||||
builds). In contrast, OSL_DASSERT does all for debug builds, and none
|
||||
(not even the test) for release builds. #1080 #1087 (1.11.3)
|
||||
* Refactor the implementation of the `Dual` template to support more
|
||||
efficient code generation when used in vectorized loops (this will be
|
||||
@@ -278,21 +789,46 @@ Build & test system improvements:
|
||||
hidden that is not part of the public API.
|
||||
- The ENABLERTTI build option has been renamed `ENABLE_RTTI`.
|
||||
- Config based install and usage.
|
||||
* Testshade makes sure that no unreported errors accumulted in the texture
|
||||
system or image cache. #939 (1.11.0)
|
||||
* testshade: Check that no leftover errors are in the TextureSystem or
|
||||
ImageCache at the end of the test (that would indicate that someplace in
|
||||
OSL we are failing to check texture errors). #939 (1.10.3/1.11.0)
|
||||
* testshade:
|
||||
- Make sure that no unreported errors accumulated in the texture system
|
||||
or image cache. #939 (1.11.0)
|
||||
- Check that no leftover errors are in the TextureSystem or ImageCache
|
||||
at the end of the test (that would indicate that someplace in OSL we
|
||||
are failing to check texture errors). #939 (1.10.3/1.11.0)
|
||||
- `testshade -o` : now `null` as the filename will not produce any
|
||||
output. This is handy to mark a renderer output but without storing
|
||||
the results as an image. #1193 (1.11.6)
|
||||
- `--vary_pdxdy`, `--vary_udxdy` and `--vary_vdxdy` allow a way to
|
||||
force P, u, v to have varying derivatives (for testing purposes).
|
||||
#1227 (1.11.7.1)
|
||||
* Supporting dependencies:
|
||||
- Build script finding of LLVM is now more robust to certain library
|
||||
configurations of llvm, particularly where everything is bundled in
|
||||
just one libLLVM without a separate libLLVMMCJIT. #976 (1.10.4/1.11.0)
|
||||
- Support for LLVM 4 has been dropped. #981 (1.11.0)
|
||||
- Simplified finding of flex/bison, rely more on CMake's built-in
|
||||
flex/bison find packages. #977 (1.11.0)
|
||||
- Verified that OSL can be built with Clang 8 and LLVM 8.0.
|
||||
- When building against recent OIIO versions whose Sysutil supports
|
||||
stack dumps, crashes in the command line tools (including testshade)
|
||||
will print stack traces to aid debugging. #1019 (1.11.0)
|
||||
- Improve finding of OpenEXR/IlmBase. #1022 (1.11.0)
|
||||
- Fix problems when building against Qt 5.13 due to deprecated calls.
|
||||
#1043 (1.11.0)
|
||||
- Fixes for CI when using OIIO 2.1 master that has changed its own cmake
|
||||
minimum to 3.12. #1065 (1.11.1)
|
||||
- Improvement for how the build system figures out which LLVM static
|
||||
libraries are needed. #1070 (1.11.1)
|
||||
- Improvements in finding Partio. #1125 (1.11.5)
|
||||
- Fixes to support Qt 5.15 (currently, osltoy is the only component that
|
||||
uses Qt). #1204 (1.11.6)
|
||||
- Better able to find LLVM when the system installation of LLVM has its
|
||||
llvm-config named `llvm-config-64`. #1238 (1.11.7.1)
|
||||
- Fixes for OIIO 2.2 which has eliminated use of tinyformat in favor of
|
||||
always relying on fmtlib. #1242 (1.11.7.1)
|
||||
* A new build-time CMake variable `OSL_LIBNAME_SUFFIX` lets you optionally
|
||||
add a custom suffix to the main libraries that are built. (Use with
|
||||
caution.) #970 (1.11.0)
|
||||
* Build script finding of LLVM is now more robust to certain library
|
||||
configurations of llvm, particularly where everything is bundled in just
|
||||
one libLLVM without a separate libLLVMMCJIT. #976 (1.10.4/1.11.0)
|
||||
* Support for LLVM 4 has been dropped. #981 (1.11.0)
|
||||
* Simplified finding of flex/bison, rely more on CMake's built-in flex/bison
|
||||
find packages. #977 (1.11.0)
|
||||
* Verified that OSL can be built with Clang 8 and LLVM 8.0.
|
||||
* Add a build-time option GLIBCXX_USE_CXX11_ABI to force the "new/old string
|
||||
ABI" to something other than the default for your version of gcc. #995
|
||||
(1.10.5/1.11.0)
|
||||
@@ -302,47 +838,31 @@ Build & test system improvements:
|
||||
#956 (1.10.0)
|
||||
* When OptiX mode is enabled (USE_OPTIX=1), the testsuite will some tests in
|
||||
an additional time forcing OptiX mode: any test containing a file named
|
||||
`OPTIX` in its test directory; or all tests if enviroment variable
|
||||
`OPTIX` in its test directory; or all tests if environment variable
|
||||
`TESTSUITE_OPTIX=1` (except tests that contain a file named `NOOPTIX` in
|
||||
their directory. #1004 (1.10.0)
|
||||
* Allow OSL to build with `USE_LLVM_BITCODE` enabled on Windows. #998 (1.10.0)
|
||||
* Various Windows compilation improvements. #1017 #1020
|
||||
* When building against recent OIIO versions whose Sysutil supports stack
|
||||
dumps, crashes in the command line tools (including testshade) will
|
||||
print stack traces to aid debugging. #1019 (1.11.0)
|
||||
* Improve finding of OpenEXR/IlmBase. #1022 (1.11.0)
|
||||
* Fix signed/unsigned comparison warnings. #1037 (1.11.0)
|
||||
* Fix problems when building against Qt 5.13 due to deprecated calls. #1043
|
||||
(1.11.0)
|
||||
* Fixes for MinGW compiler on Windows. #1047 #1048 (1.11.0)
|
||||
* Fixes for CI when using OIIO 2.1 master that has changed its own cmake
|
||||
minimum to 3.12. #1065 (1.11.1)
|
||||
* Scripts and tests utilizing Python have all been visited to make sure they
|
||||
are compatible with both Python 2.x and Python 3.x. #1071 (1.11.1)
|
||||
* Improvement for how the build system figures out which LLVM static
|
||||
libraries are needed. #1070 (1.11.1)
|
||||
* Build: on OSX, better logic about the OIIO plugin must be built as a
|
||||
module or as a shared library. #1078 (1.11.3/1.10.8)
|
||||
* Removed support for Boost Wave for preprocessing osl input. We now always
|
||||
use clang library components for preprocessing. #1089 (1.11.3)
|
||||
* Add an optional build-time `EXTRA_WARNINGS` option (default: OFF) that
|
||||
enables even more picky than usual warnings. Fix many warnings that cropped
|
||||
up during testing, mostly related to unused function paramters. #1106 (1.11.3)
|
||||
up during testing, mostly related to unused function parameters. #1106 (1.11.3)
|
||||
* The testsuite can run in parallel, with a number of threads set by the
|
||||
environment variable `CTEST_PARALLEL_LEVEL`. #1119 (1.11.4)
|
||||
* Improvements in finding Partio. #1125 (1.11.5)
|
||||
* oslconfig.h is now generated by a cmake configure_file step, from
|
||||
oslconfig.h.in. #1141 (1.11.5)
|
||||
* Use ASWF docker images to speed up many of the CI matrix entries, as well
|
||||
as to excactly test several VFX Platform specs. #1169 (1.11.6)
|
||||
as to exactly test several VFX Platform specs. #1169 (1.11.6)
|
||||
* Fix typo that botched the version in the .pc pkgconfig file. #1168 (1.11.6)
|
||||
* CI test against gcc9 and gcc10. #1192 (1.11.6)
|
||||
* Propagate RTTI compile options to exported cmake config. #1194 (1.11.6)
|
||||
* `testshade -o` : now `null` as the filename will not produce any output.
|
||||
This is handy to mark a renderer output but without storing the results
|
||||
as an image. #1193 (1.11.6)
|
||||
* Fixes to support Qt 5.15 (currently, osltoy is the only component that
|
||||
uses Qt). #1204 (1.11.6)
|
||||
|
||||
Documentation:
|
||||
* Make it clear that the documentation is licensed under the CC-BY-4.0
|
||||
@@ -352,6 +872,8 @@ Documentation:
|
||||
deformer. #1199 (1.11.6)
|
||||
* `testrender` now contains a progressive sampler, which might be a good
|
||||
example for others writing renderers. #1202 (1.11.6)
|
||||
* Fix incorrect descripton in `spline()` regarding the number of spline
|
||||
values required for each interpolation type. #1239 (1.11.7.1)
|
||||
|
||||
|
||||
Release 1.10.13 -- 1 Aug 2020 (compared to 1.10.12)
|
||||
@@ -607,7 +1129,7 @@ Shaders:
|
||||
* mandelbrot.osl: computes Mandelbrot and Julia images. #827 (1.10.0)
|
||||
* MaterialX support:
|
||||
* Improved support for MaterialX 1.36: add sin, cos, tan, atan2, ceil,
|
||||
sqrt, exp, determinent, ln, transpose, sign, rotate, transforms,
|
||||
sqrt, exp, determinant, ln, transpose, sign, rotate, transforms,
|
||||
rgb/hsv convert, extract, separate, tiledimage. Rename exponent ->
|
||||
power, pack -> combine, hsvadjust -> hueshift. Add some color2/4
|
||||
mutual conversion operators. Fixes to ramp4, clean up texture mapping
|
||||
@@ -665,7 +1187,7 @@ API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
Bug fixes and other improvements (internals):
|
||||
* The context's `texture_thread_info` is now properly passed to the
|
||||
RenderServices callbacks instead of passing NULL. (1.10.0)
|
||||
* Symbols are enbled in the JIT, allowing Intel Vtune profiler to correctly
|
||||
* Symbols are enabled in the JIT, allowing Intel Vtune profiler to correctly
|
||||
report which JITed OSL code is being executed. #830 (1.10.0)
|
||||
* ASTNode and OSLCompilerImpl -- add info() and message() methods to
|
||||
complement the existing error and warning. #854 (1.10.0)
|
||||
@@ -746,7 +1268,7 @@ Release 1.9.10 -- 1 Sep 2018 (compared to 1.9.9)
|
||||
* Add more functions to color2.h, color4.h, vector2.h, vector4.h: ceil,
|
||||
sqrt, exp, log2, log, sign, sin, cos, tan, asin, acos, atan2. #903, #904
|
||||
* Improved support for MaterialX 1.36: add sin, cos, tan, atan2, ceil, sqrt,
|
||||
exp, determinent, ln, transpose, sign, rotate, transforms, rgb/hsv convert,
|
||||
exp, determinant, ln, transpose, sign, rotate, transforms, rgb/hsv convert,
|
||||
extract, separate, tiledimage. Rename exponent -> power, pack -> combine,
|
||||
hsvadjust -> hueshift. Add some color2/4 mutual conversion operators.
|
||||
Fixes to ramp4, clean up texture mapping nodes, fixes to triplanarprojection
|
||||
@@ -831,7 +1353,7 @@ Standard library additions/changes:
|
||||
* `smoothstep()` has been extended to `T smoothstep(T edge0, T edge1, T x)`
|
||||
for T of any the `triple` types (previously, `smoothstep` only came in
|
||||
the `float` variety). #765 (1.9.0/1.8.10)
|
||||
* `mix()` has been extenended to support
|
||||
* `mix()` has been extended to support
|
||||
`color closure mix (color closure A, color closure B, color x)`
|
||||
#766 (1.9.0/1.8.10)
|
||||
* `hashnoise()` is like cellnoise (1D, 2D, 3D, or 4D input, 1D or 4D output
|
||||
@@ -1028,7 +1550,7 @@ Developer goodies:
|
||||
This lets you use the `Dual` templates for automatic differentiation of
|
||||
of ordinary 1D functions (e.g., `Dual<float,1>`) or 3D volumetric
|
||||
computations (e.g., `Dual<float,3>`). Most of OSL internals use automatic
|
||||
differentiation on 2 dimenstions (`Dual<float,2>` a.k.a. `Dual2<float>`),
|
||||
differentiation on 2 dimensions (`Dual<float,2>` a.k.a. `Dual2<float>`),
|
||||
but this change makes `dual.h` a lot more useful outside of OSL.
|
||||
#803 (1.9.1)
|
||||
|
||||
@@ -1168,7 +1690,7 @@ Language features:
|
||||
nested `{ {...}, {...} }`. #640 (1.8.0)
|
||||
* oslc (and liboslcomp) now supports UTF-8 filenames, including on
|
||||
Windows. #643 (1.8.0)
|
||||
* osl now accepts hexidecimal integer constants (such as `0x01ff`).
|
||||
* osl now accepts hexadecimal integer constants (such as `0x01ff`).
|
||||
#653 (1.8.1)
|
||||
|
||||
Standard library additions/changes:
|
||||
@@ -1184,7 +1706,7 @@ Standard library additions/changes:
|
||||
message passed to the renderer (leaving error handling and reporting
|
||||
entirely up to the shader). #686 (1.8.2)
|
||||
* `select(a,b,cond)` is similar to `mix`, but without interpolation --
|
||||
if cond is 0, returns a, else return b (per comonent). #696 (1.8.3)
|
||||
if cond is 0, returns a, else return b (per component). #696 (1.8.3)
|
||||
|
||||
API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
* ShadingSystem API changes:
|
||||
@@ -1214,7 +1736,7 @@ API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
* When the attribute "profile" is set, the statistics report will
|
||||
include a count of the total number of noise calls. #642 (1.8.0)
|
||||
* ShadingSystem and shader group attribute "exec_repeat" (int; default is
|
||||
1) can artifically manipulate how many times the shader is executed.
|
||||
1) can artificially manipulate how many times the shader is executed.
|
||||
This can sometimes be handy for tricky benchmarks. #659 (1.8.2)
|
||||
* Attribute "force_derivs" can force derivatives to be computed
|
||||
everywhere. (Mostly good for debugging or benchmarking derivatives,
|
||||
@@ -1227,7 +1749,7 @@ Performance improvements:
|
||||
output parameters and what optimizations can be done based on that. #657
|
||||
(1.8.1)
|
||||
* Better runtime optimization of certain matrix constructors. #676 (1.8.2)
|
||||
* Improved alias analyis for parameters with simple initialization ops.
|
||||
* Improved alias analysis for parameters with simple initialization ops.
|
||||
#679 (1.8.2)
|
||||
* Runtime optimizer now constant-folds bitwise `&`, `|`, `^`, `~`
|
||||
operators. #682 (1.8.2)
|
||||
@@ -1348,7 +1870,7 @@ Release 1.7.2 -- 1 Mar 2016 (compared to 1.7.1)
|
||||
|
||||
Release 1.7 [1.7.1] -- 29 Jan 2016 (compared to 1.6)
|
||||
--------------------------------------------------
|
||||
Language, standard libary, and compiler changes (for shader writers):
|
||||
Language, standard library, and compiler changes (for shader writers):
|
||||
* Language features:
|
||||
* Support for closure arrays in shader inputs. #544 (1.7.0)
|
||||
* Disallow quote strings from spanning lines (just like you can't in
|
||||
@@ -1359,7 +1881,7 @@ Language, standard libary, and compiler changes (for shader writers):
|
||||
* isconstant(expr) returns 1 if the expression can be turned into
|
||||
a constant at runtime (with full knowledge of the shader group's
|
||||
parameter values and connections). This is helpful mostly for advanced
|
||||
shader writers to verify their assuptions about which expressions can
|
||||
shader writers to verify their assumptions about which expressions can
|
||||
end up being fully constant-folded by the runtime optimizer. #578 (1.7.1)
|
||||
* New behavior of isconnected(parmaname): return 1 if the parameter
|
||||
is connected to an upstream layer, 2 if connected to a downstream layer,
|
||||
@@ -1393,7 +1915,7 @@ API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
users). (1.7.0)
|
||||
* "opt_passes" controls the number of optimization passes over each
|
||||
instance (default: 10). This is mainly for developer debugging, you
|
||||
should not need to change or expost this. #576 (1.7.1)
|
||||
should not need to change or expose this. #576 (1.7.1)
|
||||
* "connection_error" controls whether a bad connection is considered
|
||||
a true error (or is just ignored). #583 (1.7.1)
|
||||
* Shader group attribute additions/changes:
|
||||
@@ -1491,7 +2013,7 @@ Documentation:
|
||||
|
||||
Release 1.6 -- 26 May 2015 (compared to 1.5)
|
||||
-----------------------------------------------
|
||||
Language, standard libary, and compiler changes (for shader writers):
|
||||
Language, standard library, and compiler changes (for shader writers):
|
||||
* It is now supported to have shader parameters that are arrays of
|
||||
unspecified length (like 'float foo[] = {...}'). Their length will be
|
||||
fixed when they are assigned an instance value of fixed length, or when
|
||||
@@ -1632,11 +2154,11 @@ Bug fixes and other improvements:
|
||||
* Improved detection of shader groups that optimize away to nothing. (1.6.2)
|
||||
* Fix of possible (but never reported) bug with instancing merging.
|
||||
#431 (1.6.2)
|
||||
* Fix incorrect oslc code generation when assigining an element of an
|
||||
* Fix incorrect oslc code generation when assigning an element of an
|
||||
array-of-structs to another element of array-of-structs. #432 (1.6.2)
|
||||
* Bug fix in code generation of constant folding of getmatrix() calls
|
||||
(never reported symptomatic). #440 (1.6.2)
|
||||
* Fixes to constuction of temporary filename used for group serialization
|
||||
* Fixes to construction of temporary filename used for group serialization
|
||||
archive. (1.6.2)
|
||||
* Internals fix: logb() incorrectly declaring derivative functions (it
|
||||
has no derivs). #437 (1.5.12/1.6.2)
|
||||
@@ -1652,7 +2174,7 @@ Bug fixes and other improvements:
|
||||
* Bug fix: runtime optimizer should not consider a layer unused if its
|
||||
outputs are renderer outputs. Also fix subtle bug in detecting whether
|
||||
an output param is a renderer output. #457 (1.6.2)
|
||||
* Clear derivatives properly in the implementaiton of gettextureinfo.
|
||||
* Clear derivatives properly in the implementation of gettextureinfo.
|
||||
#463 (1.6.2)
|
||||
* Correct handling of point-like shader parameters defined with default
|
||||
values that use the constructors that provide "space" names. #465 (1.6.2)
|
||||
@@ -1816,7 +2338,7 @@ API changes, new options, new ShadingSystem features (for renderer writers):
|
||||
a good way to "extract" a shader network from the midst of a complex
|
||||
renderer and then be able to reconstitute it inside a debugging test
|
||||
harness like testshade. (1.5.8) (#381) For more detail and explanation,
|
||||
please see https://github.com/imageworks/OpenShadingLanguage/pull/381
|
||||
please see https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/381
|
||||
* New per-ShaderGroup attributes:
|
||||
* ShadingSystem::getattribute(group,...) allows queries that retrieve
|
||||
all the names and types of userdata the compiled group may need
|
||||
|
||||
+69
-310
@@ -1,25 +1,49 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
cmake_minimum_required (VERSION 3.12)
|
||||
project (OSL VERSION 1.11.7.0
|
||||
|
||||
set (OSL_VERSION "1.13.1.0" CACHE STRING "Version")
|
||||
project (OSL VERSION ${OSL_VERSION}
|
||||
LANGUAGES CXX C
|
||||
HOMEPAGE_URL "https://github.com/imageworks/OpenShadingLanguage")
|
||||
HOMEPAGE_URL "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage")
|
||||
set (PROJ_NAME ${PROJECT_NAME}) # short name
|
||||
string (TOLOWER ${PROJ_NAME} PROJ_NAME_LOWER) # short name lower case
|
||||
string (TOUPPER ${PROJ_NAME} PROJ_NAME_UPPER) # short name upper case
|
||||
set (PROJECT_VERSION_RELEASE_TYPE "dev") # "dev", "betaX", "RCY", ""
|
||||
set (PROJECT_VERSION_RELEASE_TYPE "dev" CACHE STRING
|
||||
"Build type, for example: dev, beta2, RC1 (empty string for normal release)")
|
||||
set (${PROJECT_NAME}_VERSION_RELEASE_TYPE ${PROJECT_VERSION_RELEASE_TYPE})
|
||||
set (PROJECT_AUTHORS "Contributors to the Open Shading Language project")
|
||||
option (${PROJECT_NAME}_SUPPORTED_RELEASE
|
||||
"Set ON for supported release branch, OFF for master" OFF)
|
||||
if (${PROJECT_NAME}_SUPPORTED_RELEASE)
|
||||
set (${PROJECT_NAME}_DEV_RELEASE OFF)
|
||||
else ()
|
||||
set (${PROJECT_NAME}_DEV_RELEASE ON)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Building ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
message (STATUS "CMake version is ${CMAKE_VERSION}")
|
||||
# Set PROJECT_IS_TOP_LEVEL to ON if if this is the top level project (not
|
||||
# if this is included as a subproject of something else). Note that this is
|
||||
# handled automatically for CMake >= 3.21.
|
||||
if (CMAKE_VERSION VERSION_LESS 3.21)
|
||||
if ("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
|
||||
set (PROJECT_IS_TOP_LEVEL ON)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set (CMAKE_BUILD_TYPE "Release")
|
||||
endif ()
|
||||
|
||||
# If the user hasn't configured cmake with an explicit
|
||||
# -DCMAKE_INSTALL_PREFIX=..., then set it to safely install into ./dist, to
|
||||
# help prevent the user from accidentally writing over /usr/local or whatever.
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND PROJECT_IS_TOP_LEVEL)
|
||||
set (CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/dist" CACHE PATH
|
||||
"Installation location" FORCE)
|
||||
endif()
|
||||
|
||||
message (STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
message (STATUS "CMake ${CMAKE_VERSION}")
|
||||
message (STATUS "CMake system = ${CMAKE_SYSTEM}")
|
||||
@@ -57,11 +81,6 @@ include (GNUInstallDirs)
|
||||
|
||||
|
||||
option (VERBOSE "Print lots of messages while compiling" OFF)
|
||||
set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING
|
||||
"Customized outer namespace base name (version will be added)")
|
||||
option (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH "Should the inner namespace include the patch number" OFF)
|
||||
set (SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
CACHE STRING "Set the SO version in the SO name of the output library")
|
||||
set (OSL_LIBNAME_SUFFIX "" CACHE STRING
|
||||
"Optional name appended to ${PROJECT_NAME} libraries that are built")
|
||||
option (OSL_BUILD_TESTS "Build the unit tests, testshade, testrender" ON)
|
||||
@@ -72,11 +91,10 @@ else ()
|
||||
endif ()
|
||||
option (OSL_BUILD_PLUGINS "Bool OSL plugins, for example OIIO plugin" ON)
|
||||
option (OSL_BUILD_SHADERS "Build shaders" ON)
|
||||
option (OSL_BUILD_MATERIALX "Build MaterialX shaders" OFF)
|
||||
option (USE_OPTIX "Include OptiX support" OFF)
|
||||
set (OPTIX_EXTRA_LIBS CACHE STRING "Extra lib targets needed for OptiX")
|
||||
set (CUDA_EXTRA_LIBS CACHE STRING "Extra lib targets needed for CUDA")
|
||||
set (CUDA_TARGET_ARCH "sm_35" CACHE STRING "CUDA GPU architecture (e.g. sm_35)")
|
||||
set (CUDA_TARGET_ARCH "sm_60" CACHE STRING "CUDA GPU architecture (e.g. sm_50)")
|
||||
set (OSL_SHADER_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/shaders"
|
||||
CACHE STRING "Directory where shaders will be installed")
|
||||
set (OSL_PTX_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/ptx"
|
||||
@@ -105,16 +123,23 @@ if (USE_OPTIX)
|
||||
add_definitions ("-DOSL_USE_OPTIX=1")
|
||||
endif ()
|
||||
|
||||
# Define OSL_INTERNAL symbol only when building OSL itself, will not be
|
||||
# defined for downstream projects using OSL.
|
||||
add_definitions (-DOSL_INTERNAL=1)
|
||||
|
||||
# Set the default namespace. For symbol hiding reasons, it's important that
|
||||
# the project name is a subset of the namespace name.
|
||||
set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING
|
||||
"Customized outer namespace base name (version will be added)")
|
||||
option (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH
|
||||
"Should the inner namespace include the patch number" ${${PROJECT_NAME}_DEV_RELEASE})
|
||||
set (PROJ_NAMESPACE "${${PROJ_NAME}_NAMESPACE}")
|
||||
string(REGEX MATCH ${PROJECT_NAME} NAMESPACE_HAS_PROJECT_NAME ${PROJ_NAMESPACE})
|
||||
if (NOT NAMESPACE_HAS_PROJECT_NAME)
|
||||
set (PROJ_NAMESPACE ${PROJECT_NAME}_${PROJ_NAMESPACE})
|
||||
endif ()
|
||||
set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE}_v${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}")
|
||||
if (OIIO_NAMESPACE_INCLUDE_PATCH)
|
||||
if (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH)
|
||||
set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE_V}_${PROJECT_VERSION_PATCH}")
|
||||
endif ()
|
||||
message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}")
|
||||
@@ -127,30 +152,50 @@ list (APPEND CMAKE_MODULE_PATH
|
||||
# Helpful functions and macros for our project
|
||||
include (colors)
|
||||
include (check_is_enabled)
|
||||
include (checked_find_package)
|
||||
|
||||
# All the C++ and compiler related options and adjustments live here
|
||||
# All the C++ and compiler related options and adjustments
|
||||
include (compiler)
|
||||
|
||||
# Utilities and options related to finding python and making python bindings
|
||||
include (pythonutils)
|
||||
|
||||
include (externalpackages)
|
||||
include (flexbison)
|
||||
include (cuda_macros)
|
||||
include (llvm_macros)
|
||||
|
||||
# Utilities related to finding python and making python bindings
|
||||
include (pythonutils)
|
||||
# Include all our testing apparatus and utils, but not if it's a subproject
|
||||
if (${PROJECT_NAME}_BUILD_TESTS AND PROJECT_IS_TOP_LEVEL)
|
||||
include (testing)
|
||||
endif ()
|
||||
|
||||
# We want CTest for testing, so this must be added before all the calls to
|
||||
# add_subdirectory, or their add_test commands will not register.
|
||||
include (CTest)
|
||||
|
||||
|
||||
include_directories (
|
||||
BEFORE
|
||||
"${OSL_LOCAL_DEPS_DIR}/include"
|
||||
"${CMAKE_SOURCE_DIR}/src/include"
|
||||
"${CMAKE_BINARY_DIR}/src/include"
|
||||
"${CMAKE_BINARY_DIR}/include"
|
||||
)
|
||||
|
||||
|
||||
# Make sure our math calculations are consistent,
|
||||
# especially division. Different compilers may have choose to use
|
||||
# reciprocal division losing precision causing slightly different
|
||||
# results which can lead to aliasing differences when running the testsuite
|
||||
# Disable reciprocal division
|
||||
if (CMAKE_COMPILER_IS_INTEL)
|
||||
if (MSVC)
|
||||
add_compile_options("/Qprec-div")
|
||||
else ()
|
||||
add_compile_options("-prec-div")
|
||||
endif ()
|
||||
elseif (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG OR CMAKE_COMPILER_IS_INTELCLANG)
|
||||
add_compile_options("-fno-reciprocal-math")
|
||||
endif ()
|
||||
|
||||
# Tell CMake to process the sub-directories
|
||||
add_subdirectory (src/include)
|
||||
add_subdirectory (src/liboslcomp)
|
||||
@@ -175,9 +220,6 @@ endif ()
|
||||
|
||||
if (OSL_BUILD_SHADERS)
|
||||
add_subdirectory (src/shaders)
|
||||
if (OSL_BUILD_MATERIALX)
|
||||
add_subdirectory (src/shaders/MaterialX)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
option (INSTALL_DOCS "Install documentation" ON)
|
||||
@@ -244,293 +286,10 @@ install (EXPORT OSL_EXPORTED_TARGETS
|
||||
FILE ${OSL_TARGETS_EXPORT_NAME}
|
||||
NAMESPACE ${PROJECT_NAME}::)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#########################################################################
|
||||
# Testing
|
||||
|
||||
# Make a build/platform/testsuite directory, and copy the master runtest.py
|
||||
# there. The rest is up to the tests themselves.
|
||||
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testsuite")
|
||||
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/testsuite/common"
|
||||
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/testsuite")
|
||||
add_custom_command (OUTPUT "${CMAKE_BINARY_DIR}/testsuite/runtest.py"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${CMAKE_SOURCE_DIR}/testsuite/runtest.py"
|
||||
"${CMAKE_BINARY_DIR}/testsuite/runtest.py"
|
||||
MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/testsuite/runtest.py")
|
||||
add_custom_target ( CopyFiles ALL DEPENDS "${CMAKE_BINARY_DIR}/testsuite/runtest.py" )
|
||||
|
||||
# add_one_testsuite() - set up one testsuite entry
|
||||
#
|
||||
# Usage:
|
||||
# add_one_testsuite ( testname
|
||||
# testsrcdir - Current test directory in ${CMAKE_SOURCE_DIR}
|
||||
# testdir - Current test sandbox in ${CMAKE_BINARY_DIR}
|
||||
# [ENV env1=val1 env2=val2 ... ] - env vars to set
|
||||
# [COMMAND cmd...] - optional override of launch command
|
||||
# )
|
||||
#
|
||||
macro (add_one_testsuite testname testsrcdir)
|
||||
cmake_parse_arguments (_tst "" "" "ENV;COMMAND" ${ARGN})
|
||||
set (testsuite "${CMAKE_SOURCE_DIR}/testsuite")
|
||||
set (testdir "${CMAKE_BINARY_DIR}/testsuite/${testname}")
|
||||
if (NOT _tst_COMMAND)
|
||||
set (_tst_COMMAND python "${testsuite}/runtest.py" ${testdir})
|
||||
if (MSVC_IDE)
|
||||
list (APPEND _tst_COMMAND --devenv-config $<CONFIGURATION>
|
||||
--solution-path "${CMAKE_BINARY_DIR}" )
|
||||
endif ()
|
||||
endif ()
|
||||
list (APPEND _tst_ENV
|
||||
OpenImageIO_ROOT=${OpenImageIO_ROOT}
|
||||
OSL_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
OSL_BUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
OSL_TESTSUITE_ROOT=${testsuite}
|
||||
OSL_TESTSUITE_SRC=${testsrcdir}
|
||||
OSL_TESTSUITE_CUR=${testdir}
|
||||
)
|
||||
file (MAKE_DIRECTORY "${testdir}")
|
||||
add_test ( NAME ${testname} COMMAND ${_tst_COMMAND} )
|
||||
# message ("Test -- env ${_tst_ENV} cmd ${_tst_COMMAND}")
|
||||
set_tests_properties (${testname} PROPERTIES ENVIRONMENT "${_tst_ENV}" )
|
||||
# Certain tests are already internally multi-threaded, so to keep them
|
||||
# from piling up together, allocate a few cores each.
|
||||
if (${testname} MATCHES "^render-")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS render
|
||||
PROCESSORS 4 COST 10)
|
||||
endif ()
|
||||
# Some labeling for fun
|
||||
if (${testname} MATCHES "^texture-")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS texture
|
||||
PROCESSORS 2 COST 4)
|
||||
endif ()
|
||||
if (${testname} MATCHES "noise")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS noise
|
||||
PROCESSORS 2 COST 4)
|
||||
endif ()
|
||||
if (${testname} MATCHES "optix")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS optix)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
|
||||
macro ( TESTSUITE )
|
||||
cmake_parse_arguments (_ats "" "LABEL;FOUNDVAR;TESTNAME" "" ${ARGN})
|
||||
# If there was a FOUNDVAR param specified and that variable name is
|
||||
# not defined, mark the test as broken.
|
||||
if (_ats_FOUNDVAR AND NOT ${_ats_FOUNDVAR})
|
||||
set (_ats_LABEL "broken")
|
||||
endif ()
|
||||
set (test_all_optix $ENV{TESTSUITE_OPTIX})
|
||||
# Add the tests if all is well.
|
||||
set (ALL_TEST_LIST "")
|
||||
set (_testsuite "${CMAKE_SOURCE_DIR}/testsuite")
|
||||
foreach (_testname ${_ats_UNPARSED_ARGUMENTS})
|
||||
set (_testsrcdir "${_testsuite}/${_testname}")
|
||||
if (_ats_TESTNAME)
|
||||
set (_testname "${_ats_TESTNAME}")
|
||||
endif ()
|
||||
if (_ats_LABEL MATCHES "broken")
|
||||
set (_testname "${_testname}-broken")
|
||||
endif ()
|
||||
|
||||
set (ALL_TEST_LIST "${ALL_TEST_LIST} ${_testname}")
|
||||
|
||||
# Run the test unoptimized, unless it matches a few patterns that
|
||||
# we don't test unoptimized (or has an OPTIMIZEONLY marker file).
|
||||
if (NOT _testname MATCHES "^getattribute-shader" AND
|
||||
NOT _testname MATCHES "optix" AND
|
||||
NOT EXISTS "${_testsrcdir}/OPTIMIZEONLY")
|
||||
add_one_testsuite ("${_testname}" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=0 )
|
||||
endif ()
|
||||
# Run the same test again with aggressive -O2 runtime
|
||||
# optimization, triggered by setting TESTSHADE_OPT env variable.
|
||||
# Skip OptiX-only tests and those with a NOOPTIMIZE marker file.
|
||||
if (NOT _testname MATCHES "optix"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
add_one_testsuite ("${_testname}.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 )
|
||||
endif ()
|
||||
# When building for OptiX support, also run it in OptiX mode
|
||||
# if there is an OPTIX marker file in the directory.
|
||||
# If an environment variable $TESTSUITE_OPTIX is nonzero, then
|
||||
# run all tests with OptiX, even if there's no OPTIX marker.
|
||||
if (USE_OPTIX
|
||||
AND (EXISTS "${_testsrcdir}/OPTIX" OR test_all_optix OR _testname MATCHES "optix")
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIX"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIX-FIXME")
|
||||
# Unoptimized
|
||||
if (NOT EXISTS "${_testsrcdir}/OPTIMIZEONLY")
|
||||
add_one_testsuite ("${_testname}.optix" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=0 TESTSHADE_OPTIX=1 )
|
||||
endif ()
|
||||
# and optimized
|
||||
add_one_testsuite ("${_testname}.optix.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 TESTSHADE_OPTIX=1 )
|
||||
endif ()
|
||||
endforeach ()
|
||||
if (VERBOSE)
|
||||
message (STATUS "Added tests: ${ALL_TEST_LIST}")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
if (OSL_BUILD_TESTS)
|
||||
# List all the individual testsuite tests here, except those that need
|
||||
# special installed tests.
|
||||
TESTSUITE ( aastep allowconnect-err and-or-not-synonyms arithmetic
|
||||
array array-derivs array-range array-aassign
|
||||
blackbody blendmath breakcont
|
||||
bug-array-heapoffsets bug-locallifetime bug-outputinit
|
||||
bug-param-duplicate bug-peep bug-return
|
||||
cellnoise closure closure-array color comparison
|
||||
compile-buffer
|
||||
component-range
|
||||
connect-components
|
||||
const-array-params const-array-fill
|
||||
debugnan debug-uninit
|
||||
derivs derivs-muldiv-clobber
|
||||
draw_string
|
||||
error-dupes error-serialized
|
||||
example-deformer
|
||||
exit exponential
|
||||
fprintf
|
||||
function-earlyreturn function-simple function-outputelem
|
||||
function-overloads function-redef
|
||||
geomath getattribute-camera getattribute-shader
|
||||
getsymbol-nonheap gettextureinfo
|
||||
group-outputs groupstring
|
||||
hash hashnoise hex hyperb
|
||||
ieee_fp if incdec initlist initops intbits isconnected isconstant
|
||||
layers layers-Ciassign layers-entry layers-lazy layers-lazyerror
|
||||
layers-nonlazycopy layers-repeatedoutputs
|
||||
linearstep
|
||||
logic loop matrix message
|
||||
mergeinstances-duplicate-entrylayers
|
||||
mergeinstances-nouserdata mergeinstances-vararray
|
||||
metadata-braces miscmath missing-shader
|
||||
named-components
|
||||
noise noise-cell
|
||||
noise-gabor noise-gabor2d-filter noise-gabor3d-filter
|
||||
noise-perlin noise-simplex
|
||||
pnoise pnoise-cell pnoise-gabor pnoise-perlin
|
||||
operator-overloading
|
||||
opt-warnings
|
||||
oslc-comma oslc-D oslc-M
|
||||
oslc-err-arrayindex oslc-err-assignmenttypes
|
||||
oslc-err-closuremul oslc-err-field
|
||||
oslc-err-format oslc-err-funcoverload
|
||||
oslc-err-intoverflow oslc-err-write-nonoutput
|
||||
oslc-err-noreturn oslc-err-notfunc
|
||||
oslc-err-initlist-args oslc-err-initlist-return
|
||||
oslc-err-named-components
|
||||
oslc-err-outputparamvararray oslc-err-paramdefault
|
||||
oslc-err-struct-array-init oslc-err-struct-ctr
|
||||
oslc-err-struct-dup oslc-err-struct-print
|
||||
oslc-err-unknown-ctr
|
||||
oslc-warn-commainit
|
||||
oslc-variadic-macro
|
||||
oslc-version
|
||||
oslinfo-arrayparams oslinfo-colorctrfloat
|
||||
oslinfo-metadata oslinfo-noparams
|
||||
osl-imageio
|
||||
paramval-floatpromotion
|
||||
pragma-nowarn
|
||||
printf-whole-array
|
||||
raytype raytype-specialized reparam
|
||||
render-background render-bumptest
|
||||
render-cornell render-furnace-diffuse
|
||||
render-microfacet render-oren-nayar render-veachmis render-ward
|
||||
select shortcircuit spline splineinverse splineinverse-ident
|
||||
spline-boundarybug spline-derivbug
|
||||
string
|
||||
struct struct-array struct-array-mixture
|
||||
struct-err struct-init-copy
|
||||
struct-isomorphic-overload struct-layers
|
||||
struct-operator-overload struct-return struct-with-array
|
||||
struct-nested struct-nested-assign struct-nested-deep
|
||||
ternary
|
||||
testshade-expr
|
||||
texture-alpha texture-blur texture-connected-options
|
||||
texture-derivs texture-errormsg
|
||||
texture-firstchannel texture-interp
|
||||
texture-missingalpha texture-missingcolor texture-simple
|
||||
texture-smallderivs texture-swirl texture-udim
|
||||
texture-width texture-withderivs texture-wrap
|
||||
trailing-commas
|
||||
transitive-assign
|
||||
transform transformc trig typecast
|
||||
unknown-instruction
|
||||
userdata
|
||||
vararray-connect vararray-default
|
||||
vararray-deserialize vararray-param
|
||||
vecctr vector
|
||||
wavelength_color Werror xml )
|
||||
|
||||
# Add tests that require the Python bindings if we built them.
|
||||
# We also exclude these tests if this is a sanitizer build on Linux,
|
||||
# because the Python interpreter itself won't be linked with the right asan
|
||||
# libraries to run correctly.
|
||||
if (USE_PYTHON AND NOT SANITIZE_ON_LINUX)
|
||||
TESTSUITE ( python-oslquery )
|
||||
if (${PROJECT_NAME}_BUILD_TESTS AND PROJECT_IS_TOP_LEVEL)
|
||||
osl_add_all_tests()
|
||||
endif ()
|
||||
|
||||
# Only run field3d-related tests if the local OIIO was built with f3d support.
|
||||
EXECUTE_PROCESS ( COMMAND ${OPENIMAGEIO_BIN} --help
|
||||
OUTPUT_VARIABLE oiiotool_help )
|
||||
if (oiiotool_help MATCHES "field3d")
|
||||
TESTSUITE ( texture-field3d )
|
||||
endif()
|
||||
|
||||
# Only run pointcloud tests if Partio is found
|
||||
if (PARTIO_FOUND)
|
||||
TESTSUITE ( pointcloud pointcloud-fold )
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
include (packaging)
|
||||
endif ()
|
||||
|
||||
# Only run the OptiX tests if OptiX and CUDA are found
|
||||
if (OPTIX_FOUND AND CUDA_FOUND)
|
||||
TESTSUITE ( testoptix testoptix-noise )
|
||||
endif ()
|
||||
|
||||
# FIXME: still working on MaterialX testsuite
|
||||
# add_subdirectory(testsuite/MaterialX)
|
||||
|
||||
endif (OSL_BUILD_TESTS)
|
||||
|
||||
|
||||
|
||||
#########################################################################
|
||||
# Packaging
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
# "Vendor" is only used in copyright notices, so we use the same thing that
|
||||
# the rest of the copyright notices say.
|
||||
set (CPACK_PACKAGE_VENDOR ${PROJECT_AUTHORS})
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenShadingLanguage is...")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/src/doc/Description.txt")
|
||||
set (CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-${platform})
|
||||
file (COPY "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION "${CMAKE_BINARY_DIR}")
|
||||
file (RENAME "${CMAKE_BINARY_DIR}/LICENSE" "${CMAKE_BINARY_DIR}/License.txt")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/License.txt")
|
||||
file (COPY "${PROJECT_SOURCE_DIR}/README.md" DESTINATION "${CMAKE_BINARY_DIR}")
|
||||
file (RENAME "${CMAKE_BINARY_DIR}/README.md" "${CMAKE_BINARY_DIR}/Readme.txt")
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/Readme.txt")
|
||||
set (CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/src/doc/Welcome.txt")
|
||||
#set (CPACK_PACKAGE_EXECUTABLES I'm not sure what this is for)
|
||||
#set (CPACK_STRIP_FILES Do we need this?)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set (CPACK_GENERATOR "TGZ;STGZ;RPM;DEB")
|
||||
set (CPACK_SOURCE_GENERATOR "TGZ")
|
||||
endif ()
|
||||
if (APPLE)
|
||||
set (CPACK_GENERATOR "TGZ;STGZ;PackageMaker")
|
||||
set (CPACK_SOURCE_GENERATOR "TGZ")
|
||||
endif ()
|
||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-source)
|
||||
#set (CPACK_SOURCE_STRIP_FILES ...FIXME...)
|
||||
set (CPACK_SOURCE_IGNORE_FILES ".*~")
|
||||
include (CPack)
|
||||
|
||||
+48
-48
@@ -10,8 +10,8 @@ why it's an open source project. Please review this document to get a
|
||||
briefing on our process.
|
||||
|
||||
|
||||
Mail List
|
||||
---------
|
||||
Mail List and Slack
|
||||
-------------------
|
||||
|
||||
Contributors should be reading the osl-dev mail list:
|
||||
|
||||
@@ -19,12 +19,19 @@ Contributors should be reading the osl-dev mail list:
|
||||
|
||||
You can sign up for the mail list on your own using the link above.
|
||||
|
||||
We also have an `openshadinglanguage` channel on the
|
||||
[ASWF Slack](https://slack.aswf.io/). But note that the Slack channel is
|
||||
not archived, so while it's ok for fleeting comments, it is unreliable as
|
||||
a permanent repository of useful information. Serious discussions that are
|
||||
we would want to refer to over time should be sent to the mail list instead.
|
||||
|
||||
|
||||
Bug Reports and Issue Tracking
|
||||
------------------------------
|
||||
|
||||
We use GitHub's issue tracking system for bugs and enhancements:
|
||||
https://github.com/imageworks/OpenShadingLanguage/issues
|
||||
We use GitHub's issue tracking system for reporting bugs and requesting
|
||||
enhancements:
|
||||
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/issues
|
||||
|
||||
**If you are merely asking a question ("how do I...")**, please do not file an
|
||||
issue, but instead ask the question on the [OSL developer mail
|
||||
@@ -48,41 +55,30 @@ Contributor License Agreement (CLA) and Intellectual Property
|
||||
To protect the project -- and the contributors! -- we do require a
|
||||
Contributor License Agreement (CLA) for anybody submitting changes.
|
||||
|
||||
**While the repo is still under github.com/imageworks**
|
||||
|
||||
* If you are an individual writing the code on your own time and you're SURE
|
||||
you are the sole owner of any intellectual property you contribute, use the
|
||||
[Individual CLA](http://opensource.imageworks.com/cla/pdf/Imageworks_Contributor_License_Agreement_Individual.pdf).
|
||||
|
||||
* If you are writing the code as part of your job, or if there is any
|
||||
possibility that your employers might think they own any intellectual
|
||||
property you create, then you should use the [Corporate
|
||||
CLA](http://opensource.imageworks.com/cla/pdf/Imageworks_Contributor_License_Agreement_Corporate.pdf).
|
||||
|
||||
Download the appropriate CLA from the links above, print, sign, and rescan
|
||||
it (or just add a digital signature directly), and email it to:
|
||||
opensource@imageworks.com
|
||||
|
||||
Our CLA's are based on those used by Apache and many other open source
|
||||
projects.
|
||||
|
||||
**After the repo is moved to github.com/AcademySoftwareFoundation**
|
||||
|
||||
OSL uses EasyCLA for managing CLAs, which automatically checks to ensure
|
||||
CLAs are signed by a contributor before a commit can be merged.
|
||||
|
||||
* If you are an individual writing the code on your own time and
|
||||
you're SURE you are the sole owner of any intellectual property you
|
||||
contribute, you can [sign the CLA as an individual contributor](https://github.com/communitybridge/easycla/blob/master/contributors/sign-a-cla-as-an-individual-contributor-to-github.md).
|
||||
|
||||
* If you are writing the code as part of your job, or if there is any
|
||||
* [Corporate CLA](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/ASWF/OSL-CLA-corporate.md)
|
||||
If you are writing the code as part of your job, or if there is any
|
||||
possibility that your employers might think they own any intellectual
|
||||
property you create, then you should use the [Corporate Contributor
|
||||
Licence Agreement](https://github.com/communitybridge/easycla/blob/master/contributors/contribute-to-a-github-company-project.md).
|
||||
property you create. This needs to be executed by someone who has
|
||||
signatory power for the company.
|
||||
|
||||
* [Individual]((https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/ASWF/OSL-CLA-individual.md)).
|
||||
If you are an individual writing the code on your own time and you're SURE
|
||||
you are the sole owner of any intellectual property you contribute.
|
||||
|
||||
The easiest way to sign CLAs is digitally [using EasyCLA](https://corporate.v1.easycla.lfx.linuxfoundation.org).
|
||||
Companies who prefer not to use the online tools may sign, scan, and email
|
||||
the executed copy to manager@lfprojects.org.
|
||||
|
||||
The CLA allows a company to name a "CLA Manager" (who does not need
|
||||
signatory power) who has the ability to use the online system to add or
|
||||
delete individual employees of the company who are authorized to submit pull
|
||||
requests, without needing to get an executive to amend and sign the
|
||||
agreement each time.
|
||||
|
||||
Please note that these CLAs are based on the Apache 2.0 CLAs, and differ
|
||||
minimally, only as much as was required to correctly describe the EasyCLA
|
||||
process and our use of a CLA manager.
|
||||
|
||||
The OSL CLAs may be previewed here:
|
||||
[Corporate](https://github.com/imageworks/OpenShadingLanguage/ASWF/OSL-CLA-corporate.md),
|
||||
[Individual]((https://github.com/imageworks/OpenShadingLanguage/ASWF/OSL-CLA-individual.md)).
|
||||
|
||||
** Contribution sign off
|
||||
|
||||
@@ -115,7 +111,7 @@ The best way to submit changes is via GitHub Pull Request. GitHub has a
|
||||
All code must be formally reviewed before being merged into the official
|
||||
repository. The protocol is like this:
|
||||
|
||||
1. Get a GitHub account, fork imageworks/OpenShadingLanguage to create your
|
||||
1. Get a GitHub account, fork AcademySoftwareFoundation/OpenShadingLanguage to create your
|
||||
own repository on GitHub, and then clone it to get a repository on your
|
||||
local machine.
|
||||
|
||||
@@ -177,9 +173,16 @@ it really only applies to the particular file in which it appears.
|
||||
|
||||
#### Formatting
|
||||
|
||||
NEVER alter somebody else's code to reformat just because you found
|
||||
something that violates the rules. Let the group/author/leader know, and
|
||||
resist the temptation to change it yourself.
|
||||
We use clang-format to enforce formatting rules for the vast majority of the
|
||||
code base. It is automatically run during CI and is a CI failure if the code
|
||||
does not conform. There are, however, parts of the code base that are not
|
||||
clang-formatted, either because we have not yet put them under the
|
||||
clang-format regime, or because individual modules were deemed to be less
|
||||
clear with clang-format than with hand formatting.
|
||||
|
||||
For non-clang-format regions of code, NEVER alter somebody else's code to
|
||||
reformat just because you found something that violates the rules. Let the
|
||||
group/author/leader know, and resist the temptation to change it yourself.
|
||||
|
||||
Each line of text in your code should be at most 80 characters long.
|
||||
Exceptions are allowed for those rare cases where letting a line be longer
|
||||
@@ -221,13 +224,10 @@ Function calls should have a space between the function name and the opening
|
||||
parenthesis, NO space inside the parenthesis, except for a single blank
|
||||
space between each argument. For example:
|
||||
|
||||
x = foo (a, b); // Yes, this is always ok
|
||||
x = foo(a, b); // Yes
|
||||
|
||||
x = foo ( a, b ); // No
|
||||
x = foo (a,b); // No
|
||||
x = foo(a, b); // No
|
||||
x = foo(a); // Occasionally, this just looks better, when the function name is short,
|
||||
// and there's just one very short argument. What can I say, I do it too.
|
||||
|
||||
Function declarations: function names should begin at column 0 for a full
|
||||
function definition. (It's ok to violate this rule for very short inline
|
||||
@@ -237,7 +237,7 @@ functions within class definitions.)
|
||||
Here is a short code fragment that shows some of these rules in action:
|
||||
|
||||
static int
|
||||
function (int a, int b)
|
||||
function(int a, int b)
|
||||
{
|
||||
int x = a + b;
|
||||
if (a == 0 || b == 0) {
|
||||
@@ -248,7 +248,7 @@ Here is a short code fragment that shows some of these rules in action:
|
||||
}
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
x += a * i;
|
||||
x *= foo (i); // function call
|
||||
x *= foo(i); // function call
|
||||
}
|
||||
return x;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ Namespaces: yes, use them!
|
||||
Prefer C++11 `std` rather than Boost or other third party libraries, where
|
||||
both can do the same task.
|
||||
|
||||
If you see a third party libary already used as a dependency (such as OIIO,
|
||||
If you see a third party library already used as a dependency (such as OIIO,
|
||||
Boost, Ilmbase, or LLVM), feel free to any of its public features in OSL
|
||||
internals (provided those features are present in the minimum version of
|
||||
that library that we support).
|
||||
|
||||
+6
-5
@@ -125,20 +125,21 @@ represents the project at all ASWF TAC meetings.
|
||||
|
||||
### TSC Members
|
||||
|
||||
(Proposed list, subject to revision, some are placeholders while their
|
||||
organizations decide who should be the permanent representative)
|
||||
Current voting members of the TSC are:
|
||||
|
||||
* **Chair and TAC repreentative**: Chris Kulla - Sony Pictures Imageworks
|
||||
* **Chief Architect**: Larry Gritz, Sony Pictures Imageworks
|
||||
* **Chair and TAC representative**: Chris Kulla - Epic Games
|
||||
* **Chief Architect**: Larry Gritz - Sony Pictures Imageworks
|
||||
|
||||
* Luke Emrose - Animal Logic
|
||||
* Eric Enderton - NVIDIA
|
||||
* Stephen Friedman - Pixar
|
||||
* Derek Haase - DNEG
|
||||
* Nicolas Guiard - Isotropix
|
||||
* Clint Hanson - DNEG
|
||||
* Adrien Herubel - Autodesk
|
||||
* Lee Kerley - Sony Pictures Imageworks
|
||||
* Mitch Prater - Laika
|
||||
* Brecht Van Lommel - Blender
|
||||
* Alex Wells - Intel
|
||||
|
||||
### TSC Nomination and Succession
|
||||
|
||||
|
||||
+40
-44
@@ -12,19 +12,16 @@ Dependencies
|
||||
OSL requires the following dependencies or tools.
|
||||
NEW or CHANGED dependencies since the last major release are **bold**.
|
||||
|
||||
* Build system: [CMake](https://cmake.org/) 3.12 or newer (tested through 3.18)
|
||||
* Build system: [CMake](https://cmake.org/) 3.12 or newer (tested through 3.24)
|
||||
|
||||
* A suitable C++11 compiler to build OSL itself, which may be any of:
|
||||
- GCC 4.8.5 or newer (tested through gcc 10)
|
||||
- Clang 3.4 or newer (tested through clang 10)
|
||||
- Microsoft Visual Studio 2015 or newer
|
||||
- Intel C++ compiler icc version 13 (?) or newer
|
||||
* A suitable C++14 or C++17 compiler to build OSL itself, which may be any of:
|
||||
- GCC 6.1 or newer (tested through gcc 12.1)
|
||||
- Clang 3.4 or newer (tested through clang 15)
|
||||
- Microsoft Visual Studio 2017 or newer
|
||||
- Intel C++ compiler icc version 17 or newer or LLVM-based icx compiler
|
||||
version 2022 or newer.
|
||||
|
||||
OSL should compile also properly with C++14 or C++17, but they are not
|
||||
required (unless you are using LLVM >= 10, in which case at least C++14
|
||||
is needed).
|
||||
|
||||
* **[OpenImageIO](http://openimageio.org) 2.0 or newer** (tested through 2.2)
|
||||
* **[OpenImageIO](http://openimageio.org) 2.3 or newer** (tested through 2.4)
|
||||
|
||||
OSL uses OIIO both for its texture mapping functionality as well as
|
||||
numerous utility classes. If you are integrating OSL into an existing
|
||||
@@ -38,31 +35,35 @@ NEW or CHANGED dependencies since the last major release are **bold**.
|
||||
|
||||
After building OpenImageIO, if you don't have it installed in a
|
||||
"standard" place (like /usr/include), you should set the environment
|
||||
variable $OPENIMAGEIOHOME to point to the compiled distribution, as
|
||||
well as for $OPENIMAGEIOHOME/lib to be in your LD_LIBRARY_PATH (or
|
||||
DYLD_LIBRARY_PATH on OS X) and then OSL's build scripts will be able
|
||||
to find it.
|
||||
variable $OpenImageIO_ROOT to point to the compiled distribution, and
|
||||
then OSL's build scripts will be able to find it. You should also have
|
||||
$OpenImageIO_ROOT/lib to be in your LD_LIBRARY_PATH (or
|
||||
DYLD_LIBRARY_PATH on OS X).
|
||||
|
||||
* **[LLVM](http://www.llvm.org) 7, 8, 9, or 10**, including
|
||||
* [LLVM](http://www.llvm.org) 9, 10, 11, 12, 13, 14, or 15, including
|
||||
clang libraries.
|
||||
|
||||
Note that LLVM 10 is not compatible with C++11, and requires C++14 or
|
||||
later. If you *must* build OSL with C++11, you need to use an LLVM that
|
||||
is LLVM 9 or earlier.
|
||||
* (optional) For GPU rendering on NVIDIA GPUs:
|
||||
* [OptiX](https://developer.nvidia.com/rtx/ray-tracing/optix) 7.0 or higher.
|
||||
* [Cuda](https://developer.nvidia.com/cuda-downloads) 8.0 or higher.
|
||||
|
||||
* [Boost](www.boost.org) 1.55 or newer (tested through boost 1.73)
|
||||
* [Ilmbase](http://openexr.com/downloads.html) 2.0 or newer (tested through 2.5)
|
||||
* [Flex](https://github.com/westes/flex) and
|
||||
[GNU Bison](https://www.gnu.org/software/bison/)
|
||||
* [Boost](https://www.boost.org) 1.55 or newer (tested through boost 1.80)
|
||||
* [Ilmbase or Imath](https://github.com/AcademySoftwareFoundation/openexr) 2.3
|
||||
or newer (recommended: 2.4 or higher; tested through 3.1)
|
||||
* [Flex](https://github.com/westes/flex) 2.5.35 or newer and
|
||||
[GNU Bison](https://www.gnu.org/software/bison/) 2.7 or newer.
|
||||
Note that on some MacOS/xcode releases, the system-installed Bison is too
|
||||
old, and it's better to install a newer Bison (via Homebrew is one way to
|
||||
do this easily).
|
||||
* [PugiXML](http://pugixml.org/)
|
||||
* (optional) [Partio](https://www.disneyanimation.com/technology/partio.html)
|
||||
If it is not found at build time, the OSL `pointcloud` functions will not
|
||||
be operative.
|
||||
* (optional) Python: If you are building the Python bindings or running the
|
||||
testsuite:
|
||||
* Python >= 2.7 (tested against 2.7, 3.6, 3.7, 3.8)
|
||||
* pybind11 >= 2.4.2 (Tested through 2.5)
|
||||
* NumPy
|
||||
testsuite:
|
||||
* Python >= 2.7 (tested against 2.7, 3.7, 3.8, 3.9, 3.10)
|
||||
* pybind11 >= 2.4.2 (Tested through 2.10)
|
||||
* NumPy
|
||||
* (optional) Qt >= 5.6 (tested through 5.15). If not found at build time,
|
||||
the `osltoy` application will be disabled.
|
||||
|
||||
@@ -73,13 +74,13 @@ Build process
|
||||
|
||||
Here are the steps to check out, build, and test the OSL distribution:
|
||||
|
||||
0. Install and build dependencies.
|
||||
1. Install and build dependencies.
|
||||
|
||||
1. Check out a copy of the source code from the Git repository:
|
||||
2. Check out a copy of the source code from the Git repository:
|
||||
|
||||
git clone https://github.com/imageworks/OpenShadingLanguage.git osl
|
||||
git clone https://github.com/AcademySoftwareFoundation/OpenShadingLanguage.git osl
|
||||
|
||||
2. Change to the distribution directory and 'make'
|
||||
3. Change to the distribution directory and 'make'
|
||||
|
||||
cd osl
|
||||
make
|
||||
@@ -95,22 +96,17 @@ Here are the steps to check out, build, and test the OSL distribution:
|
||||
"make STOP_ON_WARNING=0", that create a build that will only stop for
|
||||
full errors, not warnings.
|
||||
|
||||
3. After compilation, you'll end up with a full OSL distribution in
|
||||
dist/ARCH, where ARCH is the architecture you are building on, one of
|
||||
"linux", "linux64", "macosx", "windows", or "windows64".
|
||||
4. After compilation, you'll end up with a full OSL distribution in
|
||||
dist/
|
||||
|
||||
Note: The default is to make an optimized "release" build. If
|
||||
instead type 'make debug' at the top level, you will end up with
|
||||
a debug build (no optimization, full symbols) in "dist/ARCH.debug".
|
||||
|
||||
4. Add the "dist/ARCH/bin" to your $PATH, and "dist/ARCH/lib" to your
|
||||
$LD_LIBRAY_PATH (or $DYLD_LIBRARY_PATH on OS X), or copy the contents
|
||||
5. Add the "dist/bin" to your $PATH, and "dist/lib" to your
|
||||
$LD_LIBRAY_PATH (or $DYLD_LIBRARY_PATH on MacOS), or copy the contents
|
||||
of those files to appropriate directories. Public include files
|
||||
(those needed when building applications that incorporate OSL)
|
||||
can be found in "dist/ARCH/include", and documentation can be found
|
||||
in "dist/ARCH/share/doc".
|
||||
can be found in "dist/include", and documentation can be found
|
||||
in "dist/share/doc".
|
||||
|
||||
5. After building (and setting your library path), you can run the
|
||||
6. After building (and setting your library path), you can run the
|
||||
test suite with:
|
||||
|
||||
make test
|
||||
@@ -118,4 +114,4 @@ Here are the steps to check out, build, and test the OSL distribution:
|
||||
Troubleshooting
|
||||
----------------
|
||||
|
||||
- [Build issues on macOS Catalina (fatal error: 'wchar.h' file not found)](https://github.com/imageworks/OpenShadingLanguage/issues/1055#issuecomment-581920327)
|
||||
- [Build issues on macOS Catalina (fatal error: 'wchar.h' file not found)](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/issues/1055#issuecomment-581920327)
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
See [LICENSE.md](LICENSE.md) for the main open source license of original
|
||||
code written for the Open Shading Language project.
|
||||
|
||||
The remainder of this file reproduces the open source licensing details
|
||||
of other projects that have been imported, incorporated into, or derived
|
||||
into parts of OSL.
|
||||
|
||||
In no particular order:
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
BSD 3-Clause License
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
* OpenImgageIO Copyright (c) Larry Gritz, et al.
|
||||
https://github.com/OpenImageIO/oiio
|
||||
|
||||
Many bits of code flow back and forth between OIIO and OSL, especially
|
||||
parts of the CMake build system.
|
||||
|
||||
* OpenEXR, Copyright (c) Contributors to the OpenEXR Project.
|
||||
https://github.com/AcademySoftwareFoundation/OpenEXR
|
||||
|
||||
OSL replicates and modifies several files from the "Imath" portion of
|
||||
OpenEXR. These are all found in src/include/OSL/Imathx.
|
||||
|
||||
* Qt, Copyright (c) The Qt Company Ltd.
|
||||
http://doc.qt.io/
|
||||
|
||||
Some widget code in src/osltoy is copied and/or derived from example code
|
||||
for Qt.
|
||||
|
||||
* Highlight.js
|
||||
https://github.com/highlightjs/highlight.js/
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
* Markdeep
|
||||
https://casual-effects.com/markdeep
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Public domain
|
||||
|
||||
* The simplex noise implementation is Copyright (c) Stefan Gustavson.
|
||||
It bears the following notice:
|
||||
|
||||
This library is public domain software, released by the author
|
||||
into the public domain in February 2011. You may do anything
|
||||
you like with it. You may even remove all attributions,
|
||||
but of course I'd appreciate it if you kept my name somewhere.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
If we have left anything out, it is unintentional. Please let us know.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
@@ -22,18 +22,9 @@ working_dir := ${shell pwd}
|
||||
# Figure out which architecture we're on
|
||||
include ${working_dir}/src/make/detectplatform.mk
|
||||
|
||||
# Presence of make variables DEBUG and PROFILE cause us to make special
|
||||
# builds, which we put in their own areas.
|
||||
ifdef DEBUG
|
||||
variant +=.debug
|
||||
endif
|
||||
ifdef PROFILE
|
||||
variant +=.profile
|
||||
endif
|
||||
|
||||
MY_MAKE_FLAGS ?=
|
||||
MY_NINJA_FLAGS ?=
|
||||
MY_CMAKE_FLAGS += -g3
|
||||
MY_CMAKE_FLAGS ?=
|
||||
BUILDSENTINEL ?= Makefile
|
||||
NINJA ?= ninja
|
||||
CMAKE ?= cmake
|
||||
@@ -47,10 +38,8 @@ endif
|
||||
|
||||
# Set up variables holding the names of platform-dependent directories --
|
||||
# set these after evaluating site-specific instructions
|
||||
top_build_dir ?= build
|
||||
build_dir ?= ${top_build_dir}/${platform}${variant}
|
||||
top_dist_dir ?= dist
|
||||
dist_dir ?= ${top_dist_dir}/${platform}${variant}
|
||||
build_dir ?= build
|
||||
dist_dir ?= dist
|
||||
|
||||
INSTALL_PREFIX ?= ${working_dir}/${dist_dir}
|
||||
|
||||
@@ -116,10 +105,6 @@ ifneq (${OSL_LIBNAME_SUFFIX},)
|
||||
MY_CMAKE_FLAGS += -DOSL_LIBNAME_SUFFIX:STRING=${OSL_LIBNAME_SUFFIX}
|
||||
endif
|
||||
|
||||
ifneq (${OIIO_LIBNAME_SUFFIX},)
|
||||
MY_CMAKE_FLAGS += -DOIIO_LIBNAME_SUFFIX:STRING=${OIIO_LIBNAME_SUFFIX}
|
||||
endif
|
||||
|
||||
ifneq (${OSL_BUILD_TESTS},)
|
||||
MY_CMAKE_FLAGS += -DOSL_BUILD_TESTS:BOOL=${OSL_BUILD_TESTS}
|
||||
endif
|
||||
@@ -128,10 +113,6 @@ ifneq (${OSL_BUILD_SHADERS},)
|
||||
MY_CMAKE_FLAGS += -DOSL_BUILD_SHADERS:BOOL=${OSL_BUILD_SHADERS}
|
||||
endif
|
||||
|
||||
ifneq (${OSL_BUILD_MATERIALX},)
|
||||
MY_CMAKE_FLAGS += -DOSL_BUILD_MATERIALX:BOOL=${OSL_BUILD_MATERIALX}
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
endif
|
||||
@@ -171,6 +152,14 @@ ifneq (${USE_SIMD},)
|
||||
MY_CMAKE_FLAGS += -DUSE_SIMD:STRING="${USE_SIMD}"
|
||||
endif
|
||||
|
||||
ifneq (${USE_BATCHED},)
|
||||
MY_CMAKE_FLAGS += -DUSE_BATCHED:STRING="${USE_BATCHED}"
|
||||
endif
|
||||
|
||||
ifneq (${VEC_REPORT},)
|
||||
MY_CMAKE_FLAGS += -DVEC_REPORT:BOOL="${VEC_REPORT}"
|
||||
endif
|
||||
|
||||
ifneq (${TEST},)
|
||||
TEST_FLAGS += -R ${TEST}
|
||||
endif
|
||||
@@ -223,6 +212,22 @@ ifneq (${USE_OPTIX},)
|
||||
MY_CMAKE_FLAGS += -DUSE_OPTIX:BOOL=${USE_OPTIX}
|
||||
endif
|
||||
|
||||
ifneq (${USE_PYTHON},)
|
||||
MY_CMAKE_FLAGS += -DUSE_PYTHON:BOOL=${USE_PYTHON}
|
||||
endif
|
||||
|
||||
ifneq (${PYTHON_VERSION},)
|
||||
MY_CMAKE_FLAGS += -DPYTHON_VERSION:STRING=${PYTHON_VERSION}
|
||||
endif
|
||||
|
||||
ifneq (${PYLIB_LIB_PREFIX},)
|
||||
MY_CMAKE_FLAGS += -DPYLIB_LIB_PREFIX:BOOL=${PYLIB_LIB_PREFIX}
|
||||
endif
|
||||
|
||||
ifneq (${PYLIB_INCLUDE_SONAME},)
|
||||
MY_CMAKE_FLAGS += -DPYLIB_INCLUDE_SONAME:BOOL=${PYLIB_INCLUDE_SONAME}
|
||||
endif
|
||||
|
||||
|
||||
#$(info MY_CMAKE_FLAGS = ${MY_CMAKE_FLAGS})
|
||||
#$(info MY_MAKE_FLAGS = ${MY_MAKE_FLAGS})
|
||||
@@ -235,7 +240,7 @@ endif
|
||||
#########################################################################
|
||||
# Top-level documented targets
|
||||
|
||||
all: dist
|
||||
all: install
|
||||
|
||||
# 'make debug' is implemented via recursive make setting DEBUG
|
||||
debug:
|
||||
@@ -255,7 +260,7 @@ config:
|
||||
cd ${build_dir} ; \
|
||||
${CMAKE} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
||||
${MY_CMAKE_FLAGS} ../.. ; \
|
||||
${MY_CMAKE_FLAGS} ${working_dir} ; \
|
||||
fi)
|
||||
|
||||
|
||||
@@ -293,7 +298,7 @@ clang-format: config
|
||||
)
|
||||
|
||||
|
||||
# 'make dist' is just a synonym for 'make install'
|
||||
# DEPRECATED: 'make dist' is just a synonym for 'make install'
|
||||
dist : install
|
||||
|
||||
TEST_FLAGS += --force-new-ctest-process --output-on-failure
|
||||
@@ -307,7 +312,7 @@ test: build
|
||||
LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH} \
|
||||
DYLD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${DYLD_LIBRARY_PATH} \
|
||||
OIIO_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${OIIO_LIBRARY_PATH} \
|
||||
PYTHONPATH=${working_dir}/${build_dir}/src/python:${PYTHONPATH} \
|
||||
PYTHONPATH=${working_dir}/${build_dir}/lib/python/site-packages:${PYTHONPATH} \
|
||||
ctest -E broken ${TEST_FLAGS} \
|
||||
)
|
||||
@ ( if [[ "${CODECOV}" == "1" ]] ; then \
|
||||
@@ -325,10 +330,10 @@ clean:
|
||||
realclean: clean
|
||||
${CMAKE} -E remove_directory ${dist_dir}
|
||||
|
||||
# 'make nuke' blows away the build and dist areas for all platforms
|
||||
# DEPRECATED: use 'make realclean'
|
||||
nuke:
|
||||
${CMAKE} -E remove_directory ${top_build_dir}
|
||||
${CMAKE} -E remove_directory ${top_dist_dir}
|
||||
${CMAKE} -E remove_directory ${build_dir}
|
||||
${CMAKE} -E remove_directory ${dist_dir}
|
||||
|
||||
#########################################################################
|
||||
|
||||
@@ -345,7 +350,6 @@ help:
|
||||
@echo " make profile Build and install for profiling"
|
||||
@echo " make clean Remove the temporary files in ${build_dir}"
|
||||
@echo " make realclean Remove both ${build_dir} AND ${dist_dir}"
|
||||
@echo " make nuke Remove ALL of build and dist (not just ${platform})"
|
||||
@echo " make test Run tests"
|
||||
@echo " make testall Run all tests, even broken ones"
|
||||
@echo " make clang-format Run clang-format on all the source files"
|
||||
@@ -356,7 +360,7 @@ help:
|
||||
@echo " STOP_ON_WARNING=0 Do not stop building if compiler warns"
|
||||
@echo " OSL_SITE=xx Use custom site build mods"
|
||||
@echo " MYCC=xx MYCXX=yy Use custom compilers"
|
||||
@echo " CMAKE_CXX_STANDARD=14 Compile in C++14 mode (default is C++11)"
|
||||
@echo " CMAKE_CXX_STANDARD=14 C++ standard to build with (default is 14)"
|
||||
@echo " USE_LIBCPLUSPLUS=1 For clang, use libc++"
|
||||
@echo " GLIBCXX_USE_CXX11_ABI=1 For gcc, use the new string ABI"
|
||||
@echo " EXTRA_CPP_ARGS= Additional args to the C++ command"
|
||||
@@ -379,7 +383,7 @@ help:
|
||||
@echo " BOOST_ROOT=path Custom Boost installation"
|
||||
@echo " USE_QT=0 Skip anything that needs Qt"
|
||||
@echo " LLVM-related options:"
|
||||
@echo " LLVM_VERSION=7.0 Specify which LLVM version to use"
|
||||
@echo " LLVM_VERSION=12.0 Specify which LLVM version to use"
|
||||
@echo " LLVM_DIRECTORY=xx Specify where LLVM lives"
|
||||
@echo " LLVM_NAMESPACE=xx Specify custom LLVM namespace"
|
||||
@echo " LLVM_STATIC=1 Use static LLVM libraries"
|
||||
@@ -390,11 +394,15 @@ help:
|
||||
@echo " USE_FAST_MATH=1 Use faster, but less accurate math (set to 0 for libm defaults)"
|
||||
@echo " OSL_BUILD_TESTS=0 Don't build unit tests, testshade, testrender"
|
||||
@echo " OSL_BUILD_SHADERS=0 Don't build any shaders"
|
||||
@echo " OSL_BUILD_MATERIALX=1 Build MaterialX shaders"
|
||||
@echo " USE_SIMD=arch Build with SIMD support (comma-separated choices:"
|
||||
@echo " 0, sse2, sse3, ssse3, sse4.1, sse4.2, f16c,"
|
||||
@echo " avx, avx2, avx512f)"
|
||||
@echo " USE_OPTIX=1 Build the OptiX test renderer"
|
||||
@echo " USE_BATCHED=targets Build batched SIMD execution of shaders for (comma-separated choices:"
|
||||
@echo " 0, b8_AVX, b8_AVX2, b8_AVX2_noFMA,"
|
||||
@echo " b8_AVX512, b8_AVX512_noFMA,"
|
||||
@echo " b16_AVX512, b16_AVX512_noFMA)"
|
||||
@echo " VEC_REPORT=0 Generate compiler vectorization reports"
|
||||
@echo " make test, extra options:"
|
||||
@echo " TEST=regex Run only tests matching the regex"
|
||||
@echo ""
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<div align="center">
|
||||
<img src="https://github.com/imageworks/OpenShadingLanguage/blob/master/src/doc/Figures/osl-short.png" width=256 height=128>
|
||||
<img src="https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/doc/Figures/osl-short.png" width=256 height=128>
|
||||
|
||||
<H1>Open Shading Language</H1>
|
||||
</div>
|
||||
|
||||
[](https://www.youtube.com/watch?v=nmwMz1YnGPA "Open Shading Language Reel 2020")
|
||||
|
||||
Open Shading Language
|
||||
=====================
|
||||
|
||||
Build status:
|
||||
[](https://github.com/imageworks/OpenShadingLanguage/actions)
|
||||
|
||||
[](https://github.com/imageworks/OpenShadingLanguage/LICENSE)
|
||||
[](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/actions)
|
||||
[](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/LICENSE.md)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/3061)
|
||||
|
||||
|
||||
@@ -38,7 +36,7 @@ renderers used for high-end VFX and animation work. For a full list of films
|
||||
and products, see the [filmography](#where-osl-has-been-used).
|
||||
|
||||
The OSL code is distributed under the
|
||||
["New/3-clause BSD" license](https://github.com/imageworks/OpenShadingLanguage/LICENSE),
|
||||
["New/3-clause BSD" license](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/LICENSE.md),
|
||||
and the documentation under the [Creative Commons Attribution 4.0 International
|
||||
License](https://creativecommons.org/licenses/by/4.0/). In short, you are
|
||||
free to use OSL in your own applications, whether they are free or
|
||||
@@ -228,6 +226,7 @@ adding OSL support):
|
||||
* [Chaos Group: V-Ray](https://www.chaosgroup.com/)
|
||||
* [Pixar: PhotoRealistic RenderMan RIS](https://renderman.pixar.com)
|
||||
* [Isotropix: Clarisse](http://www.isotropix.com/clarisse)
|
||||
* [Isotropix: Angie](http://www.isotropix.com/angie)
|
||||
* [Autodesk Beast](http://www.autodesk.com/products/beast/overview)
|
||||
* [Appleseed](http://appleseedhq.net)
|
||||
* [Animal Logic: Glimpse renderer](https://www.fxguide.com/featured/a-glimpse-at-animal-logic/)
|
||||
@@ -236,6 +235,7 @@ adding OSL support):
|
||||
* Ubisoft motion picture group's proprietary renderer
|
||||
* [Autodesk/SolidAngle: Arnold](https://www.solidangle.com/arnold/)
|
||||
* [Autodesk: 3DS Max 2019](https://help.autodesk.com/view/3DSMAX/2019/ENU/?guid=__developer_3ds_max_sdk_features_rendering_osl_html)
|
||||
* [Maxon: Redshift](https://www.maxon.net/en/redshift)
|
||||
|
||||
Films using OSL (grouped by year of release date):
|
||||
* **(2012)**
|
||||
@@ -332,7 +332,7 @@ Films using OSL (grouped by year of release date):
|
||||
The Kid Who Would Be King,
|
||||
Alita: Battle Angel,
|
||||
Lego Movie 2,
|
||||
Lucky 13,
|
||||
Lucky 13 (Love, Death, and Robots),
|
||||
Captain Marvel,
|
||||
Triple Frontier,
|
||||
Avengers: Endgame,
|
||||
@@ -347,22 +347,68 @@ Films using OSL (grouped by year of release date):
|
||||
Angry Birds 2,
|
||||
The Art of Racing in the Rain,
|
||||
Secret Life of Pets,
|
||||
The Mandalorian,
|
||||
The Mandalorian (S1),
|
||||
The Dark Crystal: Age of Resistance,
|
||||
The King,
|
||||
Jumanji: The Next Level,
|
||||
Richard Jewell,
|
||||
Game of Thrones,
|
||||
Lost in Space,
|
||||
* **(2020 / upcoming)**
|
||||
Game of Thrones (S8),
|
||||
Lost in Space (S1),
|
||||
Togo
|
||||
* **(2020)**
|
||||
Underwater,
|
||||
Birds of Prey,
|
||||
Onward,
|
||||
Bloodshot,
|
||||
Greyhound,
|
||||
The Old Guard,
|
||||
Mulan,
|
||||
Tenet,
|
||||
The New Mutants,
|
||||
Artemis Fowl,
|
||||
The Eight Hundred,
|
||||
Over the Moon,
|
||||
Wonder Woman 1984,
|
||||
Soul,
|
||||
The Mandalorian (S2)
|
||||
* **(2021)**
|
||||
Chaos Walking,
|
||||
Peter Rabbit 2: The Runaway,
|
||||
The Falcon and the Winder Soldier,
|
||||
Secret Magic Control Agency,
|
||||
Zack Snyder's Justice League,
|
||||
The Mitchells vs the Machines,
|
||||
Jupiter's Legacy,
|
||||
Luca,
|
||||
F9,
|
||||
Vivo,
|
||||
Jungle Cruise,
|
||||
Dune,
|
||||
No Time To Die,
|
||||
Ron's Gone Wrong,
|
||||
Venom: Let There Be Carnage,
|
||||
Last Night in Soho,
|
||||
Ghostbusters: Afterlife,
|
||||
Spider-Man 3: No Way Home,
|
||||
Matrix Resurrections
|
||||
* **(2022 / upcoming)**
|
||||
Hotel Transylvania 4: Transformania,
|
||||
Death on the Nile,
|
||||
Uncharted,
|
||||
Turning Red,
|
||||
The Adam Project,
|
||||
Doctor Strange in the Multiverse of Madness,
|
||||
Love, Death, and Robots: In Vaulted Halls Entombed,
|
||||
Jurassic World: Dominion,
|
||||
Lightyear,
|
||||
Thor: Love and Thunder,
|
||||
The Sea Beast,
|
||||
DC League of Super Pets,
|
||||
Bullet Train,
|
||||
...
|
||||
|
||||
|
||||
|
||||
Building and Installation
|
||||
-------------------------
|
||||
|
||||
@@ -386,65 +432,67 @@ Simple "how do I...", "I'm having trouble", or "is this a bug" questions are
|
||||
best asked on the [osl-dev developer mail
|
||||
list](https://lists.aswf.io/g/osl-dev).
|
||||
That's where the most people will see it and potentially be able to answer
|
||||
your question quickly (moreso than a GH "issue").
|
||||
your question quickly (more so than a GH "issue").
|
||||
|
||||
Bugs, build problems, and discovered vulnerabilities that you are relatively
|
||||
certain is a legit problem in the code, and for which you can give clear
|
||||
instructions for how to reproduce, should be [reported as
|
||||
issues](https://github.com/imageworks/OpenShadingLanguage/issues).
|
||||
issues](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/issues).
|
||||
|
||||
If confidentiality precludes a public question or issue, you may contact the
|
||||
project administrator privately at [lg@imageworks.com](lg@imageworks.com),
|
||||
including for security-related issues.
|
||||
If you think you've found a potential vulnerability in OSL, please
|
||||
confidentially report it by emailing the project administrators at
|
||||
[security@openshadinglanguage.org](security@openshadinglanguage.org).
|
||||
|
||||
If any other issue requires confidentiality that precludes a public question
|
||||
or issue, you may contact the project administrator privately at
|
||||
[lg@larrygritz.com](lg@larrygritz.com).
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
OSL welcomes code contributions, and nearly 50 people
|
||||
have done so over the years. We take code contributions via the usual GitHub
|
||||
pull request (PR) mechanism. Please see [CONTRIBUTING](CONTRIBUTING.md) for
|
||||
detailed instructions.
|
||||
OSL welcomes code contributions, and nearly 50 people have done so over the
|
||||
years. We take code contributions via the usual GitHub pull request (PR)
|
||||
mechanism. Please see [CONTRIBUTING](CONTRIBUTING.md) for detailed
|
||||
instructions.
|
||||
|
||||
|
||||
Contacts, Links, and References
|
||||
-------------------------------
|
||||
|
||||
[OSL GitHub page](https://github.com/imageworks/OpenShadingLanguage)
|
||||
[OSL GitHub page](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage)
|
||||
|
||||
[Read or subscribe to the OSL development mail list](https://lists.aswf.io/g/osl-dev)
|
||||
|
||||
Email the lead architect: lg AT imageworks DOT com
|
||||
|
||||
[Most recent PDF of the OSL language specification](https://github.com/imageworks/OpenShadingLanguage/blob/master/src/doc/osl-languagespec.pdf
|
||||
[Most recent PDF of the OSL language specification](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/doc/osl-languagespec.pdf
|
||||
)
|
||||
|
||||
[OSL home page at SPI](http://opensource.imageworks.com/?p=osl)
|
||||
[OSL home page](http://openshadinglanguage.org)
|
||||
|
||||
[Sony Pictures Imageworks main open source page](http://opensource.imageworks.com)
|
||||
|
||||
If you want to contribute code back to the project, you'll need to
|
||||
sign [a Contributor License Agreement](http://opensource.imageworks.com/cla/).
|
||||
|
||||
|
||||
Credits
|
||||
-------
|
||||
|
||||
The current project leadership is documented in the GOVERNANCE.md file.
|
||||
The current project leadership is documented in the
|
||||
[Governance](GOVERNANCE.md) file.
|
||||
|
||||
Many people have contributed features, bug fixes, and other changes to OSL
|
||||
over the years: Steve Agland, Shane Ambler, Martijn Berger, Farchad
|
||||
Bidgolirad, Nicholas Bishop, Solomon Boulos, Stefan Bruens, Stefan Büttner,
|
||||
Matthaus G. Chajdas, Alejandro Conty, Thomas Dinges, Luke Emrose, Louis
|
||||
Feng, Mark Final, Henri Fousse, Syoyo Fujita, Tim Grant, Larry Gritz, Derek
|
||||
Haase, Sven-Hendrik Haase, John Haddon, Daniel Heckenberg, Thiago Ize, Matt
|
||||
Johnson, Ronan Keryell, Chris Kulla, Elvic Liang, Max Liani, Adam Martinez,
|
||||
John Mertic, Bastien Montagne, Steena Monteiro, Alexis Oblet, Erich Ocean,
|
||||
Mikko Ohtamaa, Jino Park, Alexei Pawlow, Jay Reynolds, Declan Russell,
|
||||
Patrick Scheibe, Alex Schworer, Jonathan Scruggs, Sergey Sharybin, Cliff
|
||||
Stein, Stephan Steinbach, Esteban Tovagliari, Brecht Van Lommel, Alexander
|
||||
von Knorring, Alex Wells, Roman Zulak. (Listed alphabetically; if we've left
|
||||
anybody out, it is inadvertent, please let us know.)
|
||||
Matthaus G. Chajdas, Clark Chen, Alejandro Conty, Dieter De Baets, Thomas
|
||||
Dinges, Mads Drøschler, Luke Emrose, Louis Feng, Mark Final, Henri Fousse,
|
||||
Stephen Friedman, Syoyo Fujita, Tim Grant, Larry Gritz, Nicolas Guiard, Euan
|
||||
Haahr, Derek Haase, Sven-Hendrik Haase, John Haddon, Niklas Harrysson, Daniel
|
||||
Heckenberg, Adrien Herubel, Thiago Ize, Matt Johnson, Ronan Keryell, Chris
|
||||
Kulla, Elvic Liang, Max Liani, Adam Martinez, John Mertic, Bastien Montagne,
|
||||
Steena Monteiro, Alexis Oblet, Erich Ocean, Mikko Ohtamaa, Jino Park, Alexei
|
||||
Pawlow, Jay Reynolds, Declan Russell, Benoit Ruiz, Patrick Scheibe, Alex
|
||||
Schworer, Jonathan Scruggs, Sergey Sharybin, Sandip Shukla, Cliff Stein,
|
||||
Stephan Steinbach, Luya Tshimbalanga, Esteban Tovagliari, Brecht Van Lommel,
|
||||
Alexander von Knorring, Alex Wells, Roman Zulak. (Listed alphabetically; if
|
||||
we've left anybody out, it is inadvertent, please let us know.)
|
||||
|
||||
We cannot possibly express sufficient gratitude to the managers at Sony
|
||||
Pictures Imageworks who allowed this project to proceed, supported it
|
||||
@@ -469,9 +517,9 @@ developers and users at other VFX and animation studios.
|
||||
The OSL implementation depends upon several other open source packages,
|
||||
all with compatible licenses:
|
||||
|
||||
* [OpenImageIO (c) Larry Gritz, et al](http://www.openimageio.org)
|
||||
* [Boost - various authors](http://www.boost.org)
|
||||
* [IlmBase (c) Industrial Light & Magic](http://www.openexr.com)
|
||||
* [OpenImageIO](http://www.openimageio.org)
|
||||
* [Boost](http://www.boost.org)
|
||||
* [IlmBase](http://www.openexr.com)
|
||||
* [LLVM Compiler Infrastructure](http://llvm.org)
|
||||
|
||||
OSL's documentation incorporates parts of [Markdeep](https://casual-effects.com/markdeep/)
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
This gives guidance about which branches are supported with patches to
|
||||
security vulnerabilities.
|
||||
|
||||
| Version / branch | Supported |
|
||||
| --------- | ---------------------------------------------------- |
|
||||
| main | :white_check_mark: :construction: ALL fixes immediately, but this is a branch under development with a frequently unstable ABI and occasionally unstable API. |
|
||||
| 1.12.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |
|
||||
| 1.11.x | :warning: Only the most critical fixes, only if they can be easily backported. |
|
||||
| <= 1.10.x | :x: No longer receiving patches of any kind. |
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you think you've found a potential vulnerability in OSL, please report it
|
||||
by emailing the project administrators at
|
||||
[security@openshadinglanguage.org](security@openshadinglanguage.org). Only the
|
||||
project administrators have access to these messages. Include detailed steps to
|
||||
reproduce the issue, and any other information that could aid an
|
||||
investigation. Our policy is to respond to vulnerability reports within 14
|
||||
days.
|
||||
|
||||
Our policy is to address critical security vulnerabilities rapidly and post
|
||||
patches as quickly as possible.
|
||||
+293
@@ -0,0 +1,293 @@
|
||||
See [LICENSE.md](LICENSE.md) for the main open source license of original
|
||||
code written for the Open Shading Language project.
|
||||
|
||||
The remainder of this file reproduces the open source licensing details
|
||||
of other projects that have been imported, incorporated into, or derived
|
||||
into parts of OSL.
|
||||
|
||||
In no particular order:
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
BSD 3-Clause License
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
* OpenImageIO Copyright (c) Larry Gritz, et al.
|
||||
https://github.com/OpenImageIO/oiio
|
||||
|
||||
Many bits of code flow back and forth between OIIO and OSL, especially
|
||||
parts of the CMake build system.
|
||||
|
||||
* OpenEXR, Copyright (c) Contributors to the OpenEXR Project.
|
||||
https://github.com/AcademySoftwareFoundation/OpenEXR
|
||||
|
||||
OSL replicates and modifies several files from the "Imath" portion of
|
||||
OpenEXR. These are all found in src/include/OSL/Imathx.
|
||||
|
||||
* Qt, Copyright (c) The Qt Company Ltd.
|
||||
http://doc.qt.io/
|
||||
|
||||
Some widget code in src/osltoy is copied and/or derived from example code
|
||||
for Qt.
|
||||
|
||||
* Highlight.js
|
||||
https://github.com/highlightjs/highlight.js/
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
* Markdeep
|
||||
https://casual-effects.com/markdeep
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Public domain
|
||||
|
||||
* The simplex noise implementation is Copyright (c) Stefan Gustavson.
|
||||
It bears the following notice:
|
||||
|
||||
This library is public domain software, released by the author
|
||||
into the public domain in February 2011. You may do anything
|
||||
you like with it. You may even remove all attributions,
|
||||
but of course I'd appreciate it if you kept my name somewhere.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Modified Apache 2.0 License
|
||||
|
||||
Universal Scene Description
|
||||
Copyright Pixar.
|
||||
|
||||
Portions of the build_osl.py were derived from scripts distributed with USD.
|
||||
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor
|
||||
and its affiliates, except as required to comply with Section 4(c) of
|
||||
the License and to reproduce the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
If we have left anything out, it is unintentional. Please let us know.
|
||||
-200
@@ -1,200 +0,0 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
|
||||
clone_depth: 10
|
||||
version: '{branch}-{build}'
|
||||
|
||||
# Disable Appveyor's test discovery which is not used
|
||||
test: off
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- release
|
||||
- appveyor
|
||||
- /RB-/
|
||||
- /lg-/
|
||||
|
||||
skip_tags: true
|
||||
|
||||
build:
|
||||
parallel: true
|
||||
verbosity: detailed
|
||||
|
||||
platform:
|
||||
- x64
|
||||
# - x86
|
||||
|
||||
configuration:
|
||||
#- Debug
|
||||
- Release
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLSET: msvc14
|
||||
|
||||
os:
|
||||
- Visual Studio 2015
|
||||
|
||||
cache:
|
||||
- C:\projects\OSLdeps -> appveyor.yml
|
||||
# The -> means that the cache dir is discarded if appveyor.yml has changed
|
||||
|
||||
before_build:
|
||||
- ps: |
|
||||
$OSL_INSTALL_BEGIN=Get-Date
|
||||
Write-Output "Configuration: $env:CONFIGURATION"
|
||||
Write-Output "Platform: $env:PLATFORM"
|
||||
ls C:\Program Files\LLVM
|
||||
Get-ChildItem Env:
|
||||
|
||||
[Array]$OSL_BUILD_FLAGS = "--", "/nologo", "/verbosity:minimal";
|
||||
|
||||
$DWN_DIR = "C:\projects\OSLdownloads"
|
||||
$DEP_DIR = "C:\projects\OSLdeps"
|
||||
$BOOST_ROOT = "C:\Libraries\boost_1_69_0"
|
||||
$PYTHON_DIR = "C:\Python27"
|
||||
$LLVM_DIR = "C:\Program Files\LLVM\bin"
|
||||
#$LLVM_DIR = "$DEP_DIR"
|
||||
$env:Path += ";$DEP_DIR\lib;$DEP_DIR\bin"
|
||||
$OSL_INT_DIR = "build\windows$env:PLATFORM"
|
||||
|
||||
# RDP into the build-bot to try some stuff out
|
||||
# iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
# Choose the VisualStudio generator
|
||||
$GENERATOR = switch ($env:TOOLSET)
|
||||
{
|
||||
"msvc14" {"Visual Studio 14 2015"}
|
||||
"msvc12" {"Visual Studio 12 2013"}
|
||||
"msvc11" {"Visual Studio 11 2012"}
|
||||
"msvc10" {"Visual Studio 10 2010"}
|
||||
}
|
||||
|
||||
# Final setup based on 64 or 32 bit
|
||||
if ($env:PLATFORM -eq "x64") {
|
||||
$GENERATOR = "$GENERATOR Win64"
|
||||
$PYTHON_DIR = "$PYTHON_DIR-x64"
|
||||
$BOOST_LIBRARYDIR = "$BOOST_ROOT\lib64-msvc-14.0"
|
||||
} else {
|
||||
$BOOST_LIBRARYDIR = "$BOOST_ROOT\lib32-msvc-14.0"
|
||||
}
|
||||
|
||||
# Always create the download directory
|
||||
md $DWN_DIR -Force | Out-Null;
|
||||
|
||||
# If the dependency directory exists/cached, use it
|
||||
if(!(Test-Path -Path $DEP_DIR )){
|
||||
md $DEP_DIR -Force | Out-Null; cd $DEP_DIR
|
||||
md $DEP_DIR\include -Force | Out-Null; cd $DEP_DIR
|
||||
md $DEP_DIR\lib -Force | Out-Null; cd $DEP_DIR
|
||||
|
||||
cd $DWN_DIR
|
||||
nuget install libtiff-$env:TOOLSET-$env:PLATFORM-master -Version 4.0.6.85 -Source https://ci.appveyor.com/nuget/libtiff-i3h8tqqy7o7b
|
||||
mv .\libtiff*\*.h $DEP_DIR\include\
|
||||
mv .\libtiff*\*.lib $DEP_DIR\lib\
|
||||
mv .\libtiff*\*.dll $DEP_DIR\lib\
|
||||
|
||||
nuget install libpng-$env:TOOLSET-$env:PLATFORM-master -Version 1.6.18.44 -Source https://ci.appveyor.com/nuget/libpng-7hwq4pmmrc48
|
||||
mv .\libpng*\*.h $DEP_DIR\include\
|
||||
mv .\libpng*\*.lib $DEP_DIR\lib\
|
||||
mv .\libpng*\*.dll $DEP_DIR\lib\
|
||||
|
||||
nuget install libjpeg-$env:TOOLSET-$env:PLATFORM-master -Version 1.4.80.21 -Source https://ci.appveyor.com/nuget/libjpegturbo-o6k4js4y7pjw
|
||||
mv .\libjpeg*\*.h $DEP_DIR\include\
|
||||
mv .\libjpeg*\*.lib $DEP_DIR\lib\
|
||||
mv .\libjpeg*\*.dll $DEP_DIR\lib\
|
||||
|
||||
nuget install freetype
|
||||
mv .\freetype.2.8.0.1\build\native\include\* $DEP_DIR\include\
|
||||
mv .\freetype.2.8.0.1\build\native\lib\$env:PLATFORM\v140\dynamic\$env:CONFIGURATION\*.lib $DEP_DIR\lib\
|
||||
mv .\freetype.redist.2.8.0.1\build\native\bin\$env:PLATFORM\v140\dynamic\$env:CONFIGURATION\*.dll $DEP_DIR\lib\
|
||||
|
||||
# ZLib
|
||||
cd $DWN_DIR
|
||||
Start-FileDownload https://github.com/madler/zlib/archive/v1.2.8.tar.gz
|
||||
tar -xzf v1.2.8.tar.gz; cd zlib-1.2.8; md "$OSL_INT_DIR" -Force | Out-Null; cd "$OSL_INT_DIR"
|
||||
cmake ..\.. -G "$GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION" -DCMAKE_PREFIX_PATH="$DEP_DIR" -DCMAKE_INSTALL_PREFIX="$DEP_DIR"
|
||||
cmake --build . --config $env:CONFIGURATION --target INSTALL $OSL_BUILD_FLAGS
|
||||
|
||||
# IlmBase
|
||||
cd $DWN_DIR
|
||||
Start-FileDownload http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.1.tar.gz
|
||||
tar -xzf ilmbase-2.2.1.tar.gz ; cd ilmbase* ; md "$OSL_INT_DIR" -Force | Out-Null; cd "$OSL_INT_DIR"
|
||||
cmake ..\.. -G "$GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION" -DCMAKE_PREFIX_PATH="$DEP_DIR" -DCMAKE_INSTALL_PREFIX="$DEP_DIR" -DCMAKE_CXX_FLAGS=" /W1 /EHsc /DWIN32=1 "
|
||||
cmake --build . --config $env:CONFIGURATION --target INSTALL $OSL_BUILD_FLAGS
|
||||
|
||||
# LLVM
|
||||
# This shouldn't be necessary, we use the pre-installed LLVM
|
||||
# cd $DWN_DIR
|
||||
# git clone --depth 10 --branch release_40 https://github.com/llvm-mirror/llvm.git
|
||||
# cd llvm; md "$OSL_INT_DIR" -Force | Out-Null; cd "$OSL_INT_DIR"
|
||||
# cmake ..\.. -G "$GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION" -DCMAKE_PREFIX_PATH="$DEP_DIR" -DCMAKE_INSTALL_PREFIX="$DEP_DIR" -DLLVM_TARGETS_TO_BUILD="X86"
|
||||
# cmake --build . --config $env:CONFIGURATION --target INSTALL $OSL_BUILD_FLAGS
|
||||
|
||||
# OpenEXR
|
||||
cd $DWN_DIR
|
||||
Start-FileDownload http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.1.tar.gz
|
||||
tar -xzf openexr-2.2.1.tar.gz ; cd openexr* ; md "$OSL_INT_DIR" -Force | Out-Null; cd "$OSL_INT_DIR"
|
||||
cmake ..\.. -G "$GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION" -DCMAKE_PREFIX_PATH="$DEP_DIR" -DCMAKE_INSTALL_PREFIX="$DEP_DIR" -DILMBASE_PACKAGE_PREFIX="$DEP_DIR" -DCMAKE_CXX_FLAGS=" /W1 /EHsc /DWIN32=1 "
|
||||
cmake --build . --config $env:CONFIGURATION --target INSTALL $OSL_BUILD_FLAGS
|
||||
|
||||
}
|
||||
|
||||
# Always do this
|
||||
cinst winflexbison
|
||||
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
# OpenImageIO
|
||||
$env:OpenImageIO_ROOT = "C:\projects\oiio"
|
||||
$env:FREETYPE_DIR = "$DEP_DIR"
|
||||
$FREETYPE_LIBRARY = "$DEP_DIR\lib\freetype28.lib"
|
||||
cd $DWN_DIR
|
||||
git clone --depth 10 https://github.com/OpenImageIO/oiio.git oiiosrc
|
||||
cd .\oiiosrc; md "$OSL_INT_DIR" -Force | Out-Null; cd "$OSL_INT_DIR"
|
||||
cmake ..\.. -G "$GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION" -DCMAKE_INSTALL_PREFIX="$env:OpenImageIO_ROOT" -DCMAKE_PREFIX_PATH="$DEP_DIR;$BOOST_ROOT" -DBOOST_LIBRARYDIR="$BOOST_LIBRARYDIR" -DFREETYPE_LIBRARY="$FREETYPE_LIBRARY" -DUSE_PYTHON=OFF -DOIIO_BUILD_TESTS=OFF -DUSE_NUKE=OFF
|
||||
cmake --build . --config $env:CONFIGURATION --target INSTALL $OSL_BUILD_FLAGS
|
||||
|
||||
# Build OSL
|
||||
cd $env:APPVEYOR_BUILD_FOLDER
|
||||
md "$OSL_INT_DIR" -Force | Out-Null; cd "$OSL_INT_DIR"
|
||||
cmake ..\.. -G "$GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION" -DCMAKE_PREFIX_PATH="$env:OpenImageIO_ROOT;$DEP_DIR;$BOOST_ROOT;$LLVM_DIR" -DCMAKE_INSTALL_PREFIX="$DEP_DIR" -DLLVM_DIRECTORY="$LLVM_DIR" -DLLVM_STATIC=ON -DOpenImageIO_ROOT="$env:OpenImageIO_ROOT" -DBOOST_LIBRARYDIR="$BOOST_LIBRARYDIR" -DFLEX_EXECUTABLE="C:\ProgramData\chocolatey\lib\winflexbison\tools\win_flex.exe" -DBISON_EXECUTABLE="C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe" -DUSE_QT=OFF -DBUILD_SHARED_LIBS=ON -DLINKSTATIC=OFF
|
||||
|
||||
# OSL's CMake should probably be handling Windows config better...
|
||||
$OSL_BUILD_DIR = "$env:APPVEYOR_BUILD_FOLDER\$OSL_INT_DIR"
|
||||
$env:OSL_ROOT = "$env:APPVEYOR_BUILD_FOLDER\src"
|
||||
$env:OIIO_LIBRARY_PATH = "$OSL_BUILD_DIR\src\osl.imageio\$env:CONFIGURATION"
|
||||
$env:Path += ";$OSL_BUILD_DIR\src\oslc\$env:CONFIGURATION"
|
||||
$env:Path += ";$OSL_BUILD_DIR\src\oslinfo\$env:CONFIGURATION"
|
||||
$env:Path += ";$OSL_BUILD_DIR\src\liboslcomp\$env:CONFIGURATION"
|
||||
$env:Path += ";$OSL_BUILD_DIR\src\liboslexec\$env:CONFIGURATION"
|
||||
$env:Path += ";$OSL_BUILD_DIR\src\liboslnoise\$env:CONFIGURATION"
|
||||
$env:Path += ";$OSL_BUILD_DIR\src\liboslquery\$env:CONFIGURATION"
|
||||
$env:Path += ";$env:OpenImageIO_ROOT\lib;$env:OpenImageIO_ROOT\bin"
|
||||
$env:Path += ";$BOOST_LIBRARYDIR"
|
||||
|
||||
cmake --build . --config $env:CONFIGURATION $OSL_BUILD_FLAGS
|
||||
|
||||
$OSL_BUILD_END=Get-Date
|
||||
if(($OSL_BUILD_END-$OSL_INSTALL_BEGIN).TotalMinutes -gt 50) {
|
||||
# Change to appveyor.yml means the cache needs to be rebuilt leaving
|
||||
# us with not enough time to run the tests.
|
||||
echo "OSL tests skipped in favor of uploading dependency cache"
|
||||
# Echo to build log and Appveyors message page
|
||||
Add-AppveyorMessage -Message "OSL tests skipped in favor of uploading dependency cache" -Category Warning
|
||||
} else {
|
||||
# Test OSL
|
||||
ctest -C $env:CONFIGURATION --output-on-failure
|
||||
}
|
||||
|
||||
|
||||
#init:
|
||||
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
#on_failure:
|
||||
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Documentation
|
||||
|
||||
The OSL Documentation Project is a work in progress.
|
||||
|
||||
The plan is to adopt the OCIO Documentation Project's methodology for maintaining and building documentation of various kinds as it becomes the blueprint for the ASWF.
|
||||
|
||||
There is much work to be done here.
|
||||
|
||||
Of particular interest are these topics. Please consider adding any information you might have about any of these to the repo:
|
||||
|
||||
* Any material at all for people learning to write OSL shaders (beyond the formal language spec, which is not intended to be a tutorial or cookbook for writing shaders).
|
||||
* Example .osl code and/or .h files that are:
|
||||
1. Generally useful, but do not warrant inclusion into the OSL source itself.
|
||||
2. Tutorial in nature.
|
||||
* Robust installation or build instructions for Windows and macOS.
|
||||
* Guide for how to integrate OSL into an application such as a renderer.
|
||||
|
||||
If you have some relevant content and you'd like to discuss its inclusion, please use the OSL Documentation discussion:
|
||||
|
||||
[OSL Documentation](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/discussions/1324)
|
||||
|
||||
or alternatively, you may post to:
|
||||
|
||||
https://lists.aswf.io/g/osl-dev/topics<br>
|
||||
osl-dev@lists.aswf.io
|
||||
|
||||
You may also simply submit a PR.
|
||||
@@ -0,0 +1,341 @@
|
||||
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
||||
<!-- Copyright Contributors to the Open Shading Language Project. -->
|
||||
|
||||
# Release Procedures for Open Shading Language
|
||||
|
||||
## Version nomenclature and release cadence
|
||||
|
||||
### The meaning of the version parts
|
||||
|
||||
Our release numbers are of the form `MAJOR.MINOR.PATCH.TWEAK`, and we follow
|
||||
an almost-semantic-versioning scheme.
|
||||
|
||||
MAJOR changes are those that break backward-compatibility of the public APIs,
|
||||
requiring existing application code to change their source code where it calls
|
||||
OSL API functions in order to compile and work correctly.
|
||||
|
||||
MINOR changes guarantee API backward-compatibility with prior releases that
|
||||
have the same major number, but can introduce ABI or link incompatibilities.
|
||||
Applications using OSL need to be recompiled to move to a new minor release,
|
||||
but should not need to change their source code. Minor releases are allowed
|
||||
to drop support for sufficiently old compilers and dependencies.
|
||||
|
||||
PATCH changes guarantee both API and ABI/link backward-compatibility with
|
||||
prior releases that have the same minor number. Features and new public API
|
||||
calls may be added (thus deviating from strict semantic versioning), but only
|
||||
if they preserve ABI/link compatibility. This means that standalone functions
|
||||
or static methods may be added, but existing functions will not change their
|
||||
parameters, and no new virtual methods or struct data layouts change for patch
|
||||
releases (for classes in public header files). Application code can be
|
||||
re-linked to a new patch release without needing to be recompiled. We also
|
||||
guarantee that any compilers or dependencies supported for the first release
|
||||
of a minor series will continue to be supported for all patches to that minor
|
||||
series.
|
||||
|
||||
TWEAK changes are restricted to critical bug fixes or build breaks that do
|
||||
not alter public APIs in any way.
|
||||
|
||||
### Cadence of releases
|
||||
|
||||
Major (arbitrarily incompatible) releases happen rarely, usually with multiple
|
||||
years between them.
|
||||
|
||||
Minor (API backward-compatible) releases are scheduled annually, targeted at
|
||||
late summer (SIGGRAPH time) to be in beta, and early autumn for a full
|
||||
release.
|
||||
|
||||
Patch (API and ABI backward-compatible) releases are scheduled monthly,
|
||||
usually aiming for the first day of each month.
|
||||
|
||||
Tweak (fully forward and backward compatible) releases are not regularly
|
||||
scheduled, and only happen sporadically, when a critical fix is needed in
|
||||
between scheduled patch releases.
|
||||
|
||||
### Things are different in "main"
|
||||
|
||||
The "main" branch is where ongoing development occurs without any
|
||||
compatibility guarantees. We don't always know if the next year's release from
|
||||
main will turn out to be major (API breaking) or minor (only ABI breaking).
|
||||
|
||||
Some studios or products need the most up-to-date enhancements, and thus tend
|
||||
to build OSL from the "main" branch rather than using tagged releases. For
|
||||
these users, we try to set version numbers and occasionally tag in main, to
|
||||
send a signal about which points in main seem safe to rely on various
|
||||
compatibility levels. However, the rules are slightly different than we use
|
||||
for releases.
|
||||
|
||||
In the "main" branch:
|
||||
|
||||
- TWEAK changes within "main" only guarantee ABI back-compatibility, but may
|
||||
have additions or non-bug-fix behavior changes (akin to patch releases
|
||||
within a release branch).
|
||||
- PATCH changes within "main" are allowed to break ABI or API (changes that
|
||||
would require minor or major releases, if they were not in "main").
|
||||
- Beware of unmarked breaks in compatibility of commits in main that are
|
||||
in between developer preview tags.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Branch and tag names
|
||||
|
||||
**Branches** are places where commits containing new development may be added
|
||||
(and thus the branch markers will move over time). Branch names obey the
|
||||
following conventions:
|
||||
|
||||
- `main` is the area for arbitrary changes intended for the next year's major
|
||||
or minor release.
|
||||
- `dev-1.2` are the areas for staging additions to the next month's patch
|
||||
release for the designated minor version series.
|
||||
- `release` is a special branch marker that is always set to the latest tag of
|
||||
the currently supported, stable release family. People can count on
|
||||
"release" always being the latest stable release, whatever that may be at
|
||||
the time.
|
||||
|
||||
**Tags** indicate releases or developer previews, and once a commit is
|
||||
tagged, it is permanent and will never be moved. Tag names obey the following
|
||||
conventions:
|
||||
|
||||
- `v1.2.3.4` is a specific public stable release, corresponding to official
|
||||
major, minor, public, or tweak releases.
|
||||
- `v1.2.3.4-alpha`, `v1.2.3.4-beta`, or `v1.2.3.4-RC1` are pre-releases for an
|
||||
upcoming public stable release, at the alpha, beta, or release candidate
|
||||
stages, respectively.
|
||||
- `v1.2.3.4-dev` is a "developer preview" within "main." It is not an official
|
||||
supported release, and while the numbering may indicate compatibility versus
|
||||
other recent developer previews, they should not be assumed to be compatible
|
||||
with any prior official stable releases.
|
||||
|
||||
*Very* occasionally, other branch or tag names (with custom suffixes or
|
||||
different naming schemes) may be used for special purposes by particular
|
||||
developers or users, but should not be considered reliable or permanent, and
|
||||
in general should be ignored by anyone who didn't make the tag or branch.
|
||||
|
||||
---
|
||||
|
||||
## Release Procedures
|
||||
|
||||
### Soft freeze for monthly tweak releases:
|
||||
|
||||
We freely backport *safe*, non-ABI-breaking changes by cherry-picking them
|
||||
from main to the supported branch continually throughout most of the month.
|
||||
|
||||
In the seven days before the new month, we do a "soft freeze" where only
|
||||
important bug fixes are backported. Hold on to any other patches you wish to
|
||||
backport until after the monthly patch release (i.e., save them for the next
|
||||
month's release so you never have a release that contains changes that are
|
||||
only a few days old, and therefore not as well tested). You may, of course,
|
||||
continue to backport fixes to documentation or other non-code parts of the
|
||||
project during this soft freeze.
|
||||
|
||||
### Branching for annual major/minor releases
|
||||
|
||||
By mid-June (about 1-2 months before the beta of a new annual big release),
|
||||
you should branch and mark it as an alpha.
|
||||
|
||||
At the tip of "main," create a new branch named `dev-MAJOR.MINOR` that will be
|
||||
the staging area for the next release.
|
||||
|
||||
Customarily, at that point we add a commit to main (but not to the new
|
||||
dev-MAJ.MIN branch) that bumps main's version to the next minor level, to
|
||||
avoid any confusion between builds from main versus what will be the next
|
||||
release branch. This starts the divergence between main and the release
|
||||
branch, and henceforth, any big or compatibility-breaking changes will only be
|
||||
committed to main and not backported to the release branch. (Though we are
|
||||
loose about this rule during the alpha period and allow continued breaking
|
||||
changes in the alpha, but by the time we call it beta, we allow no more
|
||||
breaking changes.)
|
||||
|
||||
|
||||
### Prior to a release
|
||||
|
||||
1. Update CI dependencies: Ensure that the "latest" CI test specifies the
|
||||
current releases of the dependencies and compilers (check their home
|
||||
pages), and that the [INSTALL.md](../INSTALL.md) file correctly documents
|
||||
the version ranges that we expect to work and that we actively test.
|
||||
|
||||
2. Release notes: [CHANGES.md](../CHANGES.md) should be updated to reflect
|
||||
all the new features and fixes. Looking at the notes from older releases
|
||||
should provide a good example of what we're aiming for.
|
||||
|
||||
- Patch and tweak releases can be brief one-line descriptions (often the
|
||||
first line of the commit messages involved), presented in a single
|
||||
section in either chronological or any other order that seems right.
|
||||
- Minor or major releases have a much more extensive, prose-based
|
||||
description of all changes since the last minor release, broken into
|
||||
sections (dependency changes, major new features, enhancements and fixes,
|
||||
internals and developer goodies, testing/CI/ports, etc.) and ordered for
|
||||
readability and relevance.
|
||||
|
||||
3. Ensure docs are up to date:
|
||||
|
||||
- Actually read the [README.md](../README.md), [INSTALL.md](../INSTALL.md),
|
||||
and other repository docs and make sure all the information is up to
|
||||
date. Check the "contributor credits" in the README against the recent
|
||||
repo history to be sure new contributors are listed. Also check the
|
||||
list of films and make sure it includes any recent productions that are
|
||||
known to have used OSL.
|
||||
- Skim the primary user documentation to look for any obvious errors,
|
||||
especially the parts that describe new features. In the case of PDF docs
|
||||
(such as osl-languagespec.pdf), make sure that a new PDF book is built if
|
||||
the documentation source has been changed since the last release.
|
||||
- If we are using any online docs (like readthedocs), make sure it is
|
||||
building and looks correct on the web site.
|
||||
|
||||
4. Make sure the the top-level CMakeLists.txt file is updated:
|
||||
|
||||
- The version on the `project()` call should be correct.
|
||||
- The `PROJECT_VERSION_RELEASE_TYPE` variable should be set to "alpha" or
|
||||
"beta" if appropriate, "RC" for release candidate, or empty string `""`
|
||||
for most supported releases, and "dev" only for the main branch or
|
||||
developer previews.
|
||||
- The `${PROJECT_NAME}_SUPPORTED_RELEASE` variable should be `ON` for any
|
||||
release branch, `OFF` for main.
|
||||
|
||||
5. Make sure everything passes the usual CI workflow. Also check the daily or
|
||||
weekly "analysis" workflows to make sure there aren't any important
|
||||
warnings that should be fixed.
|
||||
|
||||
|
||||
### Staging alpha / beta / release candidate (annual minor/major releases only)
|
||||
|
||||
For monthly patch releases, we don't have any formal alpha/beta/RC stages.
|
||||
|
||||
For the annual minor or major releases we have a staged release:
|
||||
|
||||
- `alpha` is everything after we have branched, in which we think all the big
|
||||
new features have been added, and while we will make continued changes and
|
||||
fixes, we are aiming for increased stability and to minimize additional
|
||||
breaking changes prior to the release.
|
||||
- `beta` should be about one month prior to the final release date. We create
|
||||
a tag `v1.2.3.4-beta` and announce the beta (see below "Making the
|
||||
release"). Once we tag a beta, we try very hard not to allow any further
|
||||
changes that change the API or are not ABI-compatible (i.e., safe fixes
|
||||
only).
|
||||
- `RC` or release candidates around one week prior to the final release date.
|
||||
This is a trial run, hopefully identical to the final release (except for
|
||||
removing the RC label and making a new tag). The only changes allowed after
|
||||
RC are fixes to the most critical bugs or build breaks that would be bad for
|
||||
users to encounter. If critical problems are found with RC1, they should be
|
||||
fixed and immediately re-tagged as RC2, etc. All other fixes should be
|
||||
postponed until the next month's patch release.
|
||||
|
||||
### Making the release
|
||||
|
||||
A final release is made on the scheduled date, provided the latest RC has
|
||||
survived for at least a few days of testing without finding any critical
|
||||
problems. Don't make the release final until you are sure there are no
|
||||
truly critical bugs or build breaks that users will encounter.
|
||||
|
||||
The following are the steps for making the release:
|
||||
|
||||
1. Edit the top-level CMakeLists.txt to remove any RC designation
|
||||
(i.e., `PROJECT_VERSION_RELEASE_TYPE` should be set to `""`).
|
||||
|
||||
2. Edit CHANGES.md to reflect the correct date of the release and ensure it
|
||||
includes any last-minute changes that were made during beta or release
|
||||
candidate stages.
|
||||
|
||||
3. Push it to **your** GitHub, make sure it passes CI.
|
||||
|
||||
4. Tag the release: `git tag v1.2.3.4` (no more beta, RC, or dev suffix).
|
||||
|
||||
5. If this will now be the recommended stable release, move the `release`
|
||||
branch marker to the same position.
|
||||
|
||||
6. Push it to GitHub: `git push aswf release --tags`
|
||||
|
||||
(This example assumes "aswf" is the name of the remote for the GitHub
|
||||
`AcademySoftwareFoundation/OpenShadingLanguage` repo.)
|
||||
|
||||
7. Draft a release on GitHub: On
|
||||
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/releases
|
||||
select "Draft a new release." Choose the new tag you just pushed. Make the
|
||||
release title "Open Shading Language v1.2.3.4" (and beta, etc., designation
|
||||
if applicable). In the description, paste the release notes for this
|
||||
release (from Changes.md). If this is a beta or release candidate, check
|
||||
"this is a pre-release" box at the bottom.
|
||||
|
||||
8. Announce the release on the [osl-dev mail list](https://lists.aswf.io/g/osl-dev)
|
||||
with the subject "Release: OSL v1.2.3.4" and using one of these templates
|
||||
for the body of the email.
|
||||
|
||||
For a monthly patch release:
|
||||
|
||||
> We have tagged v1.2.3.4 as the latest production release and moved the
|
||||
> "release" branch marker to that point. This is guaranteed to be API,
|
||||
> ABI, and link back-compatible with prior 1.2 releases. Release notes
|
||||
> are below.
|
||||
>
|
||||
> (Paste the full set of 1.2 changes here, just copy the appropriate
|
||||
> part of CHANGES.md)
|
||||
|
||||
For an annual major/minor release:
|
||||
|
||||
> OSL version 1.2 has been released! Officially tagged as "v1.2.3.4", we
|
||||
> have also moved the "release" branch tag to this position. Henceforth,
|
||||
> 1.2 is the supported production release family. The API is now frozen --
|
||||
> we promise that subsequent 1.2.x releases (which should happen monthly)
|
||||
> will not break back-compatibility of API, ABI, or linkage, compared to
|
||||
> this release. Please note that this release is *not* ABI or link
|
||||
> compatible with 1.1 or older releases.
|
||||
>
|
||||
> Release notes for 1.2 outlining all the changes since last year's
|
||||
> release are below.
|
||||
>
|
||||
> Please note that a few of the build and runtime dependencies have
|
||||
> changed their minimum supported versions. (List here any important
|
||||
> changes to dependencies, compilers, or C++ standard that users should be
|
||||
> aware of.)
|
||||
>
|
||||
> (List here anything else that people should know about this release
|
||||
> family that may be surprising if they haven't followed the last year of
|
||||
> development closely, or that they must know even if they are too lazy to
|
||||
> read the release notes. If this is a major release that is not
|
||||
> backward-compatible with prior versions, warn about that here.)
|
||||
>
|
||||
> Enjoy, and please report any problems. We will continue to make patch
|
||||
> releases to the 1.2 family roughly monthly, which will contain bug fixes
|
||||
> and non-breaking enhancements.
|
||||
>
|
||||
> The older 1.1 series of releases is now considered obsolete. We will
|
||||
> continue for now to make 1.1 patch releases, but over time, these will
|
||||
> become less frequent and be reserved for only the most critical bug
|
||||
> fixes.
|
||||
>
|
||||
> The "main" branch is now progressing toward an eventual 1.3 release next
|
||||
> summer. As usual, you are welcome to use main for real work, but we do
|
||||
> not make any compatibility guarantees and don't guarantee continuing API
|
||||
> compatibility in main.
|
||||
>
|
||||
> (Paste the full set of 1.2 changes here, just copy the appropriate
|
||||
> part of CHANGES.md)
|
||||
|
||||
For a beta leading up to the annual major/minor release:
|
||||
|
||||
> OSL version 1.2 is now in beta, tagged as "v1.2.3.4-beta". We
|
||||
> will try very hard not to make any further API or ABI changes between
|
||||
> now and the final release (unless it is absolutely necessary to fix
|
||||
> an important problem identified during beta testing). The final 1.2
|
||||
> release is scheduled for [DATE GOES HERE], so please try building and
|
||||
> testing the beta so we are sure to find any problems.
|
||||
>
|
||||
> Release notes for 1.2 outlining all the changes since last year's
|
||||
> release are below.
|
||||
>
|
||||
> (Paste the full set of 1.2 changes here, just copy the appropriate
|
||||
> part of CHANGES.md)
|
||||
|
||||
|
||||
### After the release
|
||||
|
||||
Odds and ends to do after the tag is pushed and the announcements are sent:
|
||||
|
||||
- Re-read RELEASING.md and ensure that the instructions match what you
|
||||
have done. Update as necessary.
|
||||
|
||||
- For annual beta releases, post a short message to the "Open Shading
|
||||
Language" channel of the ASWF slack. It can be a one-line announcement and
|
||||
then just a link to the GitHub release page for this version.
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Application Integration
|
||||
|
||||
Contains content related to integrating OSL into a renderer, or any application for that matter, using the C API.
|
||||
@@ -0,0 +1,21 @@
|
||||
# Build and Install Instructions
|
||||
|
||||
---
|
||||
|
||||
#### Copyright Contributors to the Open Shading Language project.
|
||||
|
||||
#### SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
---
|
||||
|
||||
Contains information about building and installing OSL.
|
||||
|
||||
## Windows
|
||||
|
||||
Method #1:
|
||||
https://github.com/debaetsd/OSL_build
|
||||
|
||||
Method #2:
|
||||
Go through `doc/build_install/windows/Readme.md` and using batch files to install OSL cleanly!
|
||||
|
||||
## macOS
|
||||
@@ -0,0 +1,314 @@
|
||||
## **Building, Using and Debugging OSL in Windows**
|
||||
|
||||
---
|
||||
|
||||
#### Copyright Contributors to the Open Shading Language project.
|
||||
|
||||
#### SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
---
|
||||
|
||||
### **Contents**
|
||||
|
||||
1. Introduction
|
||||
- Experimental
|
||||
- My Setup
|
||||
- Inspiration
|
||||
2. Preparing Environment
|
||||
- Cleaning Up the PATH
|
||||
- Set-Up needed Environment Variables
|
||||
- Set Flags based on your needs
|
||||
3. Building (Release, Debug)
|
||||
- Running the code based on your config
|
||||
- Be Patient
|
||||
- Errors
|
||||
4. Running
|
||||
5. Development in Windows
|
||||
|
||||
---
|
||||
|
||||
### **1. Introduction**
|
||||
|
||||
This document is prepared for those who have problem in building OSL in Windows OS, this is completely custom setup. And it is developing to make it compatible with all situations.
|
||||
|
||||
(`Disclaimer:` This Process is completely Experimental and it worked on my system, maybe you get error with changing some configs, during this process).
|
||||
|
||||
At a first glance it seems to be complicated, but it is very easy to do, bare with me.
|
||||
So it would be great to share our experiences to reach to best way of building in Windows (and of course other Operating Systems) to save our time and energy to focus on OSL development and OSL Shader writing.
|
||||
|
||||
### **1.1 Experimental**
|
||||
|
||||
After a lot of efforts on manual building OSL on Windows, Finally I found a clean way to do that, I explained every steps I did, I hope it works for you too. This method is stricktly related to Environment Variables you create and Flags you set to the command and need patient and hard disk.
|
||||
|
||||
I've built OSL with minimal needed packages, for extra packages, they should be set as flag (**script is under development**)
|
||||
|
||||
### **1.2 My Setup**
|
||||
|
||||
This is my setup I have on my PC for building OSL, so you need to install some software before start.
|
||||
|
||||
My System and Setup Configuration:
|
||||
|
||||
**OS:** Windows 10 Home
|
||||
|
||||
**Compiler:** Microsoft Visual Studio 2019
|
||||
|
||||
**Git:** 2.28.0
|
||||
|
||||
**Python:** 3.7 tip: disable python App Installer in Manage `App Execution Aliases (Windows 10)`
|
||||
|
||||
**Cmake:** 3.18.4
|
||||
|
||||
**Qt:** 5.15.0
|
||||
|
||||
**NASM:** 2.15.05 for JPEG
|
||||
|
||||
**OpenShadingLanguage:** cloned from latest master branch
|
||||
|
||||
**Boost:** 1.70
|
||||
|
||||
**LLVM:** 11.0.0 C++ is set on C++14
|
||||
|
||||
**CLANG:** 11.0.0 C++ is set on C++14
|
||||
|
||||
**WinFlexBison:** 2.5.22
|
||||
|
||||
**Zlib:** 1.2.11
|
||||
|
||||
**JPEG:** 2.0.5
|
||||
|
||||
**TIFF:** 4.1.0
|
||||
|
||||
**PNG:** 1.6.35
|
||||
|
||||
**PyBind11:** 2.6.0
|
||||
|
||||
**LibRaw:** 0.20.2
|
||||
|
||||
**OpenImageIO:** 2.1.20
|
||||
|
||||
**OpenColorIO:** 1.1.0
|
||||
|
||||
**OpenEXR/**IlmBase: 2.5.3
|
||||
|
||||
**GLUT:** 3.2.1 freeglut on windows (this is needed for partio) (unfortunately Partio didn't build, it has a problem) (I’ve created a PR for it in Disney github repo)
|
||||
|
||||
**Disney Partio:** latest from master (zip file) (Skip this for now) (I didn't build OSL with Partio)
|
||||
|
||||
**PugiXML:** 1.10
|
||||
|
||||
---
|
||||
|
||||
### **1.3 Inspiration**
|
||||
|
||||
After lots of manual building dependencies one by one and fix errors and things I got inspired by `PIXAR USD INSTALLATION METHOD` and borrowed its structure to build OSL.
|
||||
|
||||
so I studied its python build script and found we can use same logic for installing OSL, fortunately after changing and adding OSL needed packages and some custom setup it worked fine
|
||||
It still needs some other works to make it complete for all dependencies (optional).
|
||||
|
||||
We will keep Pixar name on it as inspiration code (or we can keep their copyright)
|
||||
You can Run the installer from: `yourpath/OpenShadingLanguage/doc/build_install/windows/build_osl.bat`
|
||||
|
||||
---
|
||||
|
||||
### **21. Preparing Environment**
|
||||
|
||||
There are bunch od prerequisites for building OSL that I explained in following sections.
|
||||
|
||||
### **2.1 Cleaning Up the PATH**
|
||||
|
||||
Be sure you don't have any custom item added to PATH in your global Environment Variables of Windows
|
||||
|
||||
You can do it:
|
||||
|
||||
`Start Menu > Edit the system environmment variables > Environment Variables > User Variables/System Variables`
|
||||
|
||||
so you should not have any path that refer to previous osl installation folders
|
||||
|
||||
Recommendation: remove added path for cmake, git, python, Qt, llvm
|
||||
|
||||
it should be clean now.
|
||||
|
||||
### **2.2 Set-Up needed Environment Variables**
|
||||
|
||||
For running batch scripts without any problem I recommend to create some base environment variables.
|
||||
|
||||
**Needed Environment Variables: (Key/Value based on my installation folder)**
|
||||
|
||||
| Env Var | Path Example |
|
||||
| --------------- | ---------------------------------------------------------------------------------- |
|
||||
| BASE_LOCATION | D:\madoodia\sdks |
|
||||
| PYTHON_LOCATION | D:\madoodia\sdks |
|
||||
| QT_LOCATION | C:\Qt\5.15.0\msvc2019_64 |
|
||||
| NASM_LOCATION | C:\NASM |
|
||||
| GIT_LOCATION | "C:\Program Files\Git" |
|
||||
| CMAKE_LOCATION | "C:\Program Files\CMake" |
|
||||
| VCVARS_LOCATION | "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build" |
|
||||
|
||||
|
|
||||
|
||||
Open `doc/build_install/windows/osl_env_vars_setup.bat` in your editor and edit paths' values based on your installation folders.
|
||||
|
||||
### **2.3 Set Flags based on your needs**
|
||||
|
||||
The main build launcher is here `doc/build_install/windows/build_osl.bat`
|
||||
|
||||
For now we can not assign pre-installed llvm or boost so we have to build all together at once and put all of them in one directory.
|
||||
|
||||
I am working on it to see how we can use external llvm and boost installation without error.
|
||||
|
||||
**Table of flags we can assign to the command**
|
||||
|
||||
| Flag | State | Can Use |
|
||||
| ------------- | --------------- | ------- |
|
||||
| --osl | Implemented | Yes |
|
||||
| --python | Implemented | Yes |
|
||||
| --zlib | Implemented | Yes |
|
||||
| --boost | Implemented | Yes |
|
||||
| --llvm | Implemented | Yes |
|
||||
| --clang | Implemented | Yes |
|
||||
| --pugixml | Implemented | Yes |
|
||||
| --openexr | Implemented | Yes |
|
||||
| --tiff | Implemented | Yes |
|
||||
| --jpeg | Implemented | Yes |
|
||||
| --png | Implemented | Yes |
|
||||
| --flex | Implemented | Yes |
|
||||
| --bison | Implemented | Yes |
|
||||
| --opencolorio | Implemented | Yes |
|
||||
| --openimageio | Implemented | Yes |
|
||||
| --libraw | Implemented | Yes |
|
||||
| --pybind11 | Implemented | Yes |
|
||||
| --Ptex | Implemented | No |
|
||||
| --openvdb | Implemented | No |
|
||||
| --partio | Implemented | No |
|
||||
| --ffmpeg | Not-Implemented | No |
|
||||
| --field3d | Not-Implemented | No |
|
||||
| --opencv | Not-Implemented | No |
|
||||
| --gif | Not-Implemented | No |
|
||||
| --heif | Not-Implemented | No |
|
||||
| --squish | Not-Implemented | No |
|
||||
| --dcmtk | Not-Implemented | No |
|
||||
| --webp | Not-Implemented | No |
|
||||
|
||||
---
|
||||
|
||||
### **3. Building (Release, Debug)**
|
||||
|
||||
We Prepared some batch files to do it for you automatically.
|
||||
Based on Environment Variables you set in previous sections you can just call them and wait for it to be built and installed.
|
||||
|
||||
**My Method:**
|
||||
|
||||
- Open Powershell
|
||||
- Go to: yourPath/OpenShadingLanguage/doc/build_install/windows
|
||||
- Run build_osl.bat release
|
||||
|
||||
### **3.1 Running the code based on your config**
|
||||
|
||||
Based on the config (`Release` or `Debug`) that you send for installer it will create directory in `BASE_LOCATION` for you
|
||||
|
||||
`BASE_LOCATION/osl_release` for Release mode
|
||||
|
||||
`BASE_LOCATION/osl_debug` for Debug mode
|
||||
|
||||
**IMPORTANT:** `Good to know you can not have Release and Debug files in one directory at the same time, it makes conflict and give you weired errors. So keep them separate.`
|
||||
|
||||
### **3.2 Be Patient**
|
||||
|
||||
You should be patient because the whole process (based on your PC config) takes time between 30 minutes to 1 hour
|
||||
|
||||
And it takes:
|
||||
|
||||
**Release:** `~8Gb` of your hard disk (after installation) (Download size is `~350Mb`)
|
||||
|
||||
**Debug:** `~90Gb` of your hard disk (after installation) (Download size is `~400Mb`)
|
||||
|
||||
so please set a location to `BASE_LOCATION` that have enough space.
|
||||
|
||||
### **3.4 Errors**
|
||||
|
||||
If you got any error in any step of building process, you can remove the related package's build directory from `BASE_LOCATION/build` and run the installer again.
|
||||
|
||||
If you got any error please report to the forum of OSL.
|
||||
|
||||
---
|
||||
|
||||
### **4. Running**
|
||||
|
||||
We Prepared some batch files to do it for you automatically. Based on Environment Variables you set in previous sections you can just call it.
|
||||
|
||||
**Recommendation:** use `Powershell`
|
||||
|
||||
**TIP:** If you add your osl installation folders (both release and debug) in global Windows Environment Variable, you will get error.
|
||||
|
||||
So you can add release path or debug path in your global environment variables. Or create and use batch scripts.
|
||||
For adding path you should add these two paths to your global env variables:
|
||||
|
||||
• PATH : `<osl install dir>\bin`;
|
||||
|
||||
• PATH : `<osl install dir>\lib`;
|
||||
|
||||
For example, you can open osltoy in releae mode with running `osltoy_release_launcher.bat`
|
||||
|
||||
if you have question, feel free to ask.
|
||||
|
||||
---
|
||||
|
||||
### **5. Development in Windows**
|
||||
|
||||
After editing your code, when you want to see your changes you should build osl again. But this time, it is so faster than before, (if you keep build folders) So just need to rebuild it in release mode.
|
||||
|
||||
**Release mode**:
|
||||
|
||||
- open powershell
|
||||
- cd OpenShadingLanguage repo
|
||||
- cd build_script
|
||||
- run build_osl.bat release
|
||||
- run osl_release_sln.bat
|
||||
- example: set osltoy as default project
|
||||
- run it in release x64 mode
|
||||
|
||||
**Debug mode**:
|
||||
|
||||
- open powershell
|
||||
- cd OpenShadingLanguage repo
|
||||
- cd build_script
|
||||
- run build_osl.bat debug
|
||||
- run osl_debug_sln.bat
|
||||
- example: set osltoy as default project
|
||||
- run it in debug x64 mode
|
||||
|
||||
If you open Visual Studio solution (sln) from release or debug, you can build it from inside it after your code editing
|
||||
|
||||
I recommend using: (in **powershell**)
|
||||
|
||||
- **osl_release_sln.bat** or **osl_debug_sln.bat**
|
||||
|
||||
now you can use Visual Studio for debugging.
|
||||
|
||||
---
|
||||
|
||||
**TIP about OSLToy:**
|
||||
|
||||
If you load a shader in `osltoy` and when hit Recompile, it is crashed and closed, probabely your output color attribute name is not `Cout`
|
||||
|
||||
It is mandatory to have at least one `Cout` output Variable in any shader, Otherwise osltoy will crash.
|
||||
|
||||
That's it
|
||||
|
||||
TIP: this process is getting better, I will update the document soon
|
||||
|
||||
**Conclusion:**
|
||||
For easy installation you just need to setup your Environment Variables in `yourPath/OpenShadingLanguage/doc/build_install/windows/osl_env_vars_setup.bat` based on your paths
|
||||
|
||||
It is a custom setup, for example all dependencies are built before osl, because I had lots of issues on using external installation (like llvm)
|
||||
and I tried this method on llvm 7, 8 and 9, all with error, so my current build setup is on llvm 11 and C++14, it can be changed in code. (I am trying to make it easy to use for changing configs with arguments)
|
||||
|
||||
Please take a look at docs and let me know my mistakes.
|
||||
|
||||
This method worked fine for me for release, debug and debugging in visual studio.
|
||||
|
||||
I am trying to build OSL on `Linux` with same method. If it worked fine I will Update the build system.
|
||||
|
||||
---
|
||||
|
||||

|
||||
@@ -0,0 +1,48 @@
|
||||
@REM /* --------------------- */
|
||||
@REM Copyright Contributors to the Open Shading Language project.
|
||||
@REM SPDX-License-Identifier: BSD-3-Clause
|
||||
@REM /* --------------------- */
|
||||
|
||||
@REM Main batch file for installing OSL
|
||||
|
||||
@echo off
|
||||
|
||||
|
||||
call osl_env_vars_setup.bat
|
||||
|
||||
cls
|
||||
|
||||
set OSL_INPUT_CONFIG=%1
|
||||
|
||||
if "%OSL_INPUT_CONFIG%" equ "debug" (
|
||||
set OSL_LOCATION_DIR=osl_debug
|
||||
set OSL_BUILD_CONFIG=--debug
|
||||
goto RUN
|
||||
)
|
||||
if "%OSL_INPUT_CONFIG%" equ "release" (
|
||||
set OSL_LOCATION_DIR=osl_release
|
||||
set OSL_BUILD_CONFIG=
|
||||
goto RUN
|
||||
)
|
||||
if "%OSL_INPUT_CONFIG%" equ "" (
|
||||
echo --= Enter debug or release as argument
|
||||
exit
|
||||
)
|
||||
@REM if argument is not debug or release
|
||||
if "%OSL_INPUT_CONFIG%" neq "" (
|
||||
echo --= Enter debug or release as argument
|
||||
exit
|
||||
)
|
||||
|
||||
:RUN
|
||||
|
||||
set PATH=%CMAKE_LOCATION%/bin;GIT_LOCATION/cmd;%PYTHON_LOCATION%;%PYTHON_LOCATION%/Scripts;%QT_LOCATION%/bin;%QT_LOCATION%/lib;%NASM_LOCATION%;%PATH%
|
||||
set PYTHONPATH=%PYTHON_LOCATION%/Lib/site-packages;
|
||||
set Qt5_ROOT=%QT_LOCATION%/lib/cmake
|
||||
|
||||
call %VCVARS_LOCATION%/vcvarsall.bat x64
|
||||
|
||||
cls
|
||||
|
||||
python build_osl.py --generator "Visual Studio 16 2019" --osl --python %OSL_BUILD_CONFIG% --zlib --boost --llvm --clang --pugixml --openexr --tiff --jpeg --png --flex --bison --opencolorio --openimageio --libraw --pybind11 %BASE_LOCATION%/%OSL_LOCATION_DIR%
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
@@ -0,0 +1,19 @@
|
||||
@REM /* --------------------- */
|
||||
@REM Copyright Contributors to the Open Shading Language project.
|
||||
@REM SPDX-License-Identifier: BSD-3-Clause
|
||||
@REM /* --------------------- */
|
||||
|
||||
@REM Running Visual Studio 2019 in debug mode for editing and debugging OSL
|
||||
|
||||
@echo off
|
||||
|
||||
|
||||
|
||||
call osl_env_vars_setup.bat
|
||||
|
||||
cls
|
||||
|
||||
set PATH=%PYTHON_LOCATION%;%PYTHON_LOCATION%/Scripts;%QT_LOCATION%/bin;%QT_LOCATION%/lib;%BASE_LOCATION%/osl_debug/bin;%BASE_LOCATION%/osl_debug/lib;%PATH%
|
||||
set PYTHONPATH=%PYTHON_LOCATION%/Lib/site-packages;
|
||||
|
||||
%BASE_LOCATION%\osl_debug\build\OpenShadingLanguage\OSL.sln
|
||||
@@ -0,0 +1,33 @@
|
||||
@REM /* --------------------- */
|
||||
@REM Copyright Contributors to the Open Shading Language project.
|
||||
@REM SPDX-License-Identifier: BSD-3-Clause
|
||||
@REM /* --------------------- */
|
||||
|
||||
@REM Running Visual Studio 2019 in release mode for running OSL or editing code
|
||||
|
||||
@echo off
|
||||
|
||||
@REM TIP:
|
||||
@REM for modifying env vars based on your paths
|
||||
@REM if your path has space in it, put whole path between
|
||||
@REM double quotation
|
||||
|
||||
|
||||
set BASE_LOCATION=D:/madoodia/sdks
|
||||
set PYTHON_LOCATION=C:/Python37
|
||||
set QT_LOCATION=C:/Qt/5.15.0/msvc2019_64
|
||||
set NASM_LOCATION=C:/NASM
|
||||
set GIT_LOCATION="C:/Program Files/Git"
|
||||
set CMAKE_LOCATION="C:/Program Files/CMake"
|
||||
set VCVARS_LOCATION="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build"
|
||||
|
||||
echo --= -------------------------------------------- =--
|
||||
echo --= Environmment Variables created successfully! =--
|
||||
echo BASE_LOCATION : %BASE_LOCATION%
|
||||
echo PYTHON_LOCATION : %PYTHON_LOCATION%
|
||||
echo QT_LOCATION : %QT_LOCATION%
|
||||
echo NASM_LOCATION : %NASM_LOCATION%
|
||||
echo GIT_LOCATION : %GIT_LOCATION%
|
||||
echo CMAKE_LOCATION : %CMAKE_LOCATION%
|
||||
echo VCVARS_LOCATION : %VCVARS_LOCATION%
|
||||
echo --= -------------------------------------------- =--
|
||||
@@ -0,0 +1,18 @@
|
||||
@REM /* --------------------- */
|
||||
@REM Copyright Contributors to the Open Shading Language project.
|
||||
@REM SPDX-License-Identifier: BSD-3-Clause
|
||||
@REM /* --------------------- */
|
||||
|
||||
@REM Main batch file for installing OSL
|
||||
|
||||
@echo off
|
||||
|
||||
|
||||
call osl_env_vars_setup.bat
|
||||
|
||||
cls
|
||||
|
||||
set PATH=%PYTHON_LOCATION%;%PYTHON_LOCATION%/Scripts;%QT_LOCATION%/bin;%QT_LOCATION%/lib;%BASE_LOCATION%/osl_release/bin;%BASE_LOCATION%/osl_release/lib;%PATH%
|
||||
set PYTHONPATH=%PYTHON_LOCATION%/Lib/site-packages;
|
||||
|
||||
%BASE_LOCATION%\osl_release\build\OpenShadingLanguage\OSL.sln
|
||||
@@ -0,0 +1,18 @@
|
||||
@REM /* --------------------- */
|
||||
@REM Copyright Contributors to the Open Shading Language project.
|
||||
@REM SPDX-License-Identifier: BSD-3-Clause
|
||||
@REM /* --------------------- */
|
||||
|
||||
@REM Running OSLToy in debug mode
|
||||
|
||||
@echo off
|
||||
|
||||
|
||||
call osl_env_vars_setup.bat
|
||||
|
||||
cls
|
||||
|
||||
set PATH=%PYTHON_LOCATION%;%PYTHON_LOCATION%/Scripts;%QT_LOCATION%/bin;%QT_LOCATION%/lib;%BASE_LOCATION%/osl_debug/bin;%BASE_LOCATION%/osl_debug/lib;%PATH%
|
||||
set PYTHONPATH=%PYTHON_LOCATION%/Lib/site-packages;
|
||||
|
||||
osltoy
|
||||
@@ -0,0 +1,18 @@
|
||||
@REM /* --------------------- */
|
||||
@REM Copyright Contributors to the Open Shading Language project.
|
||||
@REM SPDX-License-Identifier: BSD-3-Clause
|
||||
@REM /* --------------------- */
|
||||
|
||||
@REM Running OSLToy in release mode
|
||||
|
||||
@echo off
|
||||
|
||||
|
||||
call osl_env_vars_setup.bat
|
||||
|
||||
cls
|
||||
|
||||
set PATH=%PYTHON_LOCATION%;%PYTHON_LOCATION%/Scripts;%QT_LOCATION%/bin;%QT_LOCATION%/lib;%BASE_LOCATION%/osl_release/bin;%BASE_LOCATION%/osl_release/lib;%PATH%
|
||||
set PYTHONPATH=%PYTHON_LOCATION%/Lib/site-packages;
|
||||
|
||||
osltoy
|
||||
@@ -0,0 +1,3 @@
|
||||
# Shader Writing in OSL
|
||||
|
||||
Contains OSL shader writing content.
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
# Web Site
|
||||
|
||||
Contains OSL web site content.
|
||||
+47
-367
@@ -1,103 +1,37 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# SPI-specific settings
|
||||
ifneq (${VERBOSE},)
|
||||
$(info Including spi/Makefile-bits)
|
||||
endif
|
||||
|
||||
# For SpComp2 builds, do:
|
||||
#
|
||||
# make OSL_SPCOMP2=1 spcomp2_install
|
||||
# or
|
||||
# make OSL_SPCOMP2=1 SPCOMP2_LOCAL_PATH=/test/path spcomp2_install_local
|
||||
#
|
||||
# For Arnold builds, do:
|
||||
#
|
||||
# make OSL_ARNOLD=1
|
||||
#
|
||||
# For a Rez-bound build, do:
|
||||
#
|
||||
# make OSL_SPIREZ=1
|
||||
#
|
||||
# (Options: OSL_REZ_NAME=blah REZ_PACKAGE_ROOT=path)
|
||||
#
|
||||
# Otherwise a default 'make' will make a fully generic OSL build.
|
||||
|
||||
OSL_SPCOMP2 ?= 0
|
||||
OSL_ARNOLD ?= 0
|
||||
OSL_SPIREZ ?= 0
|
||||
OSL_REZ_NAME ?= OSL
|
||||
OSL_VERS = $(shell grep "OSL VERSION" CMakeLists.txt | egrep -o "[0-9.]+")
|
||||
ONEVERS = $(shell site/spi/format_version.py ${OSL_VERS})
|
||||
OSL_SPCOMP2_VERSION ?= ${ONEVERS}
|
||||
|
||||
ifeq (${OSL_SPCOMP2},1)
|
||||
$(info Building for SpComp2)
|
||||
OSL_ARNOLD := 0
|
||||
NAMESPACE ?= 'OSL_SpComp2'
|
||||
SOVERSION ?= ${OSL_SPCOMP2_VERSION}
|
||||
PYLIB_LIB_PREFIX ?= 1
|
||||
PYLIB_INCLUDE_SONAME ?= 1
|
||||
OPENIMAGEIO_SPCOMP2_VERSION ?= 20103
|
||||
OPENEXR_VERSION ?= 2.2.0
|
||||
else ifeq (${OSL_ARNOLD},1)
|
||||
$(info Building for Arnold)
|
||||
NAMESPACE ?= 'OSL_Arnold'
|
||||
PYLIB_LIB_PREFIX ?= 0
|
||||
PYLIB_INCLUDE_SONAME ?= 0
|
||||
OPENEXR_VERSION ?= 2.4.0
|
||||
else ifeq (${OSL_SPIREZ},1)
|
||||
$(info Building for Rez distribution)
|
||||
NAMESPACE ?= 'OSL'
|
||||
PYLIB_LIB_PREFIX ?= 0
|
||||
PYLIB_INCLUDE_SONAME ?= 0
|
||||
MY_CMAKE_FLAGS += -DOSL_SPIREZ=1 -DOSL_REZ_PACKAGE_NAME=${OSL_REZ_NAME}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_DEBUG_POSTFIX=_d
|
||||
OPENIMAGEIO_VERSION ?= 2.2.0.0
|
||||
OPENEXR_VERSION ?= 2.4.0
|
||||
$(info Building against OpenImageIO ${OPENIMAGEIO_VERSION})
|
||||
else
|
||||
$(info Building generic OSL)
|
||||
NAMESPACE ?= 'OSL'
|
||||
PYLIB_LIB_PREFIX ?= 0
|
||||
PYLIB_INCLUDE_SONAME ?= 0
|
||||
endif
|
||||
$(info Building generic OSL)
|
||||
PYLIB_LIB_PREFIX ?= 0
|
||||
PYLIB_INCLUDE_SONAME ?= 0
|
||||
#$(info MAKECMDGOALS = $(MAKECMDGOALS))
|
||||
|
||||
|
||||
## Detect which SPI platform and set $platform, $COMPILER, $SPCOMP2_COMPILER,
|
||||
## Detect which SPI platform and set $platform, $COMPILER,
|
||||
## and PYTHON_VERSION. Lots of other decisions are based on these.
|
||||
ifeq (${SP_OS}, rhel7)
|
||||
# Rhel7 (current)
|
||||
platform := rhel7
|
||||
SPI_COMPILER_PLATFORM ?= gcc-6.3
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-4.8)
|
||||
SPCOMP2_COMPILER ?= gcc48m64
|
||||
CMAKE_CXX_STANDARD ?= 11
|
||||
else
|
||||
SPCOMP2_COMPILER ?= gcc63
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-6.3)
|
||||
CMAKE_CXX_STANDARD ?= 14
|
||||
endif
|
||||
SP_PLATFORM ?= linux
|
||||
SP_PROC ?= x86_64
|
||||
SP_REZ_OS ?= CentOS-7
|
||||
LLVM_VERSION ?= 12.0.0
|
||||
else ifeq (${platform}, macosx)
|
||||
# Generic OSX machines (including LG's laptop)
|
||||
COMPILER ?= clang
|
||||
SPCOMP2_COMPILER ?= clang
|
||||
SP_OS ?= macosx
|
||||
SP_PLATFORM ?= macosx
|
||||
SP_PROC ?= x86_64
|
||||
SP_REZ_OS ?= MacOS
|
||||
else
|
||||
$(error Unknown SP_OS=${SP_OS} platform=${platform})
|
||||
endif # endif ${SP_OS}
|
||||
|
||||
PYTHON_VERSION ?= 2.7
|
||||
MY_CMAKE_FLAGS += -DSP_OS=${SP_OS} -DSP_PLATFORM=${SP_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DSP_PROC=${SP_PROC} -DSP_REZ_OS=${SP_REZ_OS}
|
||||
MY_CMAKE_FLAGS += -DSP_OS=${SP_OS}
|
||||
MY_CMAKE_FLAGS += -DSPI_COMPILER_PLATFORM=${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DEXTRA_CPP_ARGS:STRING="-DOSL_SPI=1" -DOSL_SITE:STRING=spi
|
||||
MY_CMAKE_FLAGS += -DSPI_TESTS=1
|
||||
@@ -105,9 +39,11 @@ MY_CMAKE_FLAGS += -DOSL_NAMESPACE_INCLUDE_PATCH=1
|
||||
REZ_PACKAGE_ROOT ?= /shots/spi/home/software/packages
|
||||
SPCOMP2_ROOT ?= /shots/spi/home/lib/SpComp2
|
||||
|
||||
MY_CMAKE_FLAGS += -DOSL_EXTRA_NVCC_ARGS="--compiler-bindir=/opt/rh/devtoolset-6/root/bin/gcc"
|
||||
|
||||
## Rhel7 (current)
|
||||
ifeq (${SP_OS}, rhel7)
|
||||
PYTHON_VERSION ?= 2.7
|
||||
USE_SIMD ?= sse4.1,aes
|
||||
CMAKE ?= cmake
|
||||
USE_NINJA ?= 1
|
||||
@@ -118,34 +54,15 @@ ifeq (${SP_OS}, rhel7)
|
||||
export CCACHE_CPP2 ?= 1
|
||||
# Override lib64 and use SPI convention of lib
|
||||
MY_CMAKE_FLAGS += -DCMAKE_INSTALL_LIBDIR="${INSTALL_PREFIX}/lib"
|
||||
ifeq (${OSL_SPCOMP2},1)
|
||||
MY_CMAKE_FLAGS += -DPYTHON_SITE_DIR="${INSTALL_PREFIX}/python"
|
||||
else ifeq (${OSL_SPIREZ},1)
|
||||
MY_CMAKE_FLAGS += -DPYTHON_SITE_DIR="${INSTALL_PREFIX}/python"
|
||||
else ifeq (${OSL_ARNOLD},1)
|
||||
OIIO_LIBNAME_SUFFIX ?= _Arnold
|
||||
OSL_LIBNAME_SUFFIX ?= _Arnold
|
||||
endif
|
||||
|
||||
#
|
||||
# Compilers:
|
||||
#
|
||||
# A variety of tags can be used to try specific versions of gcc or
|
||||
# clang from the site-specific places we have installed them.
|
||||
LLVM_DIRECTORY ?= /shots/spi/home/lib/arnold/rhel7/llvm_8.0.0
|
||||
ifeq (${COMPILER},clang6)
|
||||
LLVM_DIRECTORY := /shots/spi/home/lib/arnold/rhel7/llvm_6.0.1
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang7)
|
||||
LLVM_DIRECTORY := /shots/spi/home/lib/arnold/rhel7/llvm_7.0.1
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang8)
|
||||
LLVM_DIRECTORY := /shots/spi/home/lib/arnold/rhel7/llvm_8.0.0
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang9)
|
||||
LLVM_DIRECTORY ?= /shots/spi/home/lib/arnold/rhel7/llvm_12.0.0
|
||||
LLVM_DIRECTORY ?= /shots/spi/home/software/packages/llvm/${LLVM_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
ifeq (${COMPILER},clang9)
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/9.0.1-1/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
@@ -154,7 +71,11 @@ ifeq (${SP_OS}, rhel7)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang11)
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/11.0.0-rc1/${SPI_COMPILER_PLATFORM}
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/11.0.0/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang12)
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/12.0.0-final/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang)
|
||||
@@ -171,11 +92,6 @@ ifeq (${SP_OS}, rhel7)
|
||||
-DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
endif
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-4.8)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_FLAGS="--gcc-toolchain=/usr" \
|
||||
-DCMAKE_CXX_FLAGS="--gcc-toolchain=/usr" \
|
||||
-DTOOLCHAIN_FLAGS="--gcc-toolchain=/usr"
|
||||
endif
|
||||
|
||||
MY_CMAKE_FLAGS +=
|
||||
-DLLVM_STATIC=1 \
|
||||
@@ -186,127 +102,56 @@ ifeq (${SP_OS}, rhel7)
|
||||
# Boost
|
||||
#
|
||||
BOOSTVERS ?= 1.70
|
||||
BOOSTSPSUFFIX ?=
|
||||
BOOSTVERSSP=${BOOSTVERS}${BOOSTSPSUFFIX}
|
||||
MY_CMAKE_FLAGS += -DBOOST_VERS_SP=${BOOSTVERSSP}
|
||||
# $(info BOOSTVERSSP ${BOOSTVERSSP})
|
||||
ifeq (${BOOSTVERS},1.55)
|
||||
SPBOOST_INC_DIR ?= /usr/include/boost_${BOOSTVERSSP}
|
||||
SPBOOST_LIB_DIR ?= /usr/lib64/boost_${BOOSTVERSSP}
|
||||
ifeq (${BOOSTSPSUFFIX}, sp)
|
||||
SPBOOST_LIBNAMESTART ?= lib${BOOSTSPSUFFIX}boost_${shell echo ${BOOSTVERS} | sed "s/\\./_/"}_0
|
||||
else
|
||||
SPBOOST_LIBNAMESTART ?= lib${BOOSTSPSUFFIX}boost
|
||||
endif
|
||||
SPBOOST_LIBNAMEEND ?= -gcc48-mt-${shell echo ${BOOSTVERS} | sed "s/\\./_/"}
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DBOOST_CUSTOM=1 \
|
||||
-DBoost_VERSION=${BOOSTVERS} \
|
||||
-DBoost_INCLUDE_DIRS=${SPBOOST_INC_DIR} \
|
||||
-DBoost_LIBRARY_DIRS=${SPBOOST_LIB_DIR} \
|
||||
-DBoost_LIBRARIES:STRING="${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_filesystem${SPBOOST_LIBNAMEEND}.so;${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_regex${SPBOOST_LIBNAMEEND}.so;${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_system${SPBOOST_LIBNAMEEND}.so;${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_thread${SPBOOST_LIBNAMEEND}.so"
|
||||
else
|
||||
# Our Boost >= 1.61 setup is MUCH simpler and more standard
|
||||
SPBOOST_INC_DIR := /usr/include/boostroot/boost${BOOSTVERSSP}.0
|
||||
SPBOOST_LIB_DIR := /usr/lib64/boostroot/boost${BOOSTVERSSP}.0
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DBOOST_INCLUDEDIR=${SPBOOST_INC_DIR} \
|
||||
-DBOOST_LIBRARYDIR=${SPBOOST_LIB_DIR}
|
||||
endif
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DBOOST_INCLUDEDIR=/usr/include/boostroot/boost${BOOSTVERS}.0 \
|
||||
-DBOOST_LIBRARYDIR=/usr/lib64/boostroot/boost${BOOSTVERS}.0
|
||||
|
||||
#
|
||||
# Python
|
||||
#
|
||||
PYTHON_INCLUDE_DIR ?= /usr/include/python${PYTHON_VERSION}
|
||||
Python_INCLUDE_DIR ?= /usr/include/python${PYTHON_VERSION}
|
||||
PYTHON_LIBRARY_DIR ?= /usr/lib64
|
||||
PYTHON_LIBRARY ?= ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}.so
|
||||
ifeq (${PYTHON_VERSION},3.6)
|
||||
# Special sauce for Python 3.6
|
||||
PYTHON_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}m
|
||||
PYTHON_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}m.so
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DPYTHONINTERP_FOUND=1 \
|
||||
-DPYTHON_VERSION_STRING=3.6.3 \
|
||||
-DPYTHON_VERSION_MAJOR=3 \
|
||||
-DPYTHON_VERSION_MINOR=6 \
|
||||
-DPYTHON_VERSION_PATCH=3 \
|
||||
-DPython_ADDITIONAL_VERSIONS="${PYTHON_VERSION}"
|
||||
else ifeq (${PYTHON_VERSION},3.7)
|
||||
Python_LIBRARY ?= ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}.so
|
||||
ifeq (${PYTHON_VERSION},3.7)
|
||||
# Special sauce for Python 3.7
|
||||
PYTHON_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}m
|
||||
PYTHON_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}m.so
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DPYTHONINTERP_FOUND=1 \
|
||||
-DPYTHON_VERSION_STRING=3.7.3 \
|
||||
-DPYTHON_VERSION_MAJOR=3 \
|
||||
-DPYTHON_VERSION_MINOR=7 \
|
||||
-DPYTHON_VERSION_PATCH=3 \
|
||||
-DPython_ADDITIONAL_VERSIONS="${PYTHON_VERSION}"
|
||||
Python_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}m
|
||||
Python_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}m.so
|
||||
else ifeq (${PYTHON_VERSION},2.7)
|
||||
# Special sauce for Python 2.7
|
||||
PYTHON_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}
|
||||
PYTHON_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}.so
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DPYTHONINTERP_FOUND=1 \
|
||||
-DPYTHON_VERSION_STRING=2.7.5 \
|
||||
-DPYTHON_VERSION_MAJOR=2 \
|
||||
-DPYTHON_VERSION_MINOR=7 \
|
||||
-DPYTHON_VERSION_PATCH=5 \
|
||||
-DPython_ADDITIONAL_VERSIONS="${PYTHON_VERSION}"
|
||||
Python_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}
|
||||
Python_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}.so
|
||||
endif
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DPYTHON_INCLUDE_DIR:STRING=${PYTHON_INCLUDE_DIR} \
|
||||
-DPYTHON_LIBRARY:STRING=${PYTHON_LIBRARY} \
|
||||
-DPython_INCLUDE_DIR:STRING=${Python_INCLUDE_DIR} \
|
||||
-DPython_LIBRARY:STRING=${Python_LIBRARY} \
|
||||
-Dpybind11_ROOT:STRING=${REZ_PACKAGE_ROOT}/pybind11/2.4.3/python-${PYTHON_VERSION}
|
||||
|
||||
|
||||
# Set our preferred OpenEXR path, but allow env variable to override
|
||||
# with custom/test version.
|
||||
ifneq (${OPENEXR_VERSION},)
|
||||
# If OPENEXR_VERSION is set, grab from the rez area
|
||||
OpenEXR_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenEXR/${OPENEXR_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}
|
||||
MY_CMAKE_FLAGS += -DOpenEXR_ROOT=${OpenEXR_ROOT}
|
||||
else ifeq (${OpenEXR_ROOT},)
|
||||
# If not getting from rez, get from the system install
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DOPENEXR_INCLUDE_DIR=/usr/include/OpenEXR2 \
|
||||
-DOPENEXR_LIBRARY_DIR=/usr/lib64/OpenEXR2
|
||||
endif
|
||||
OPENEXR_VERSION ?= 2.4.1-2
|
||||
OpenEXR_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenEXR/${OPENEXR_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
$(info OpenEXR_ROOT = $(OpenEXR_ROOT))
|
||||
MY_CMAKE_FLAGS += -DOpenEXR_ROOT=${OpenEXR_ROOT}
|
||||
|
||||
Partio_VERSION ?= 1.10.6
|
||||
partio_ROOT ?= ${REZ_PACKAGE_ROOT}/partio/${Partio_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERSSP}
|
||||
partio_ROOT ?= ${REZ_PACKAGE_ROOT}/partio/${Partio_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERS}
|
||||
MY_CMAKE_FLAGS += -Dpartio_ROOT="${partio_ROOT}"
|
||||
|
||||
pugixml_VERSION ?= 1.10.0
|
||||
pugixml_ROOT ?= ${REZ_PACKAGE_ROOT}/pugixml/${pugixml_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -Dpugixml_ROOT="${pugixml_ROOT}"
|
||||
|
||||
# set up OSL distribution environment
|
||||
SPARCH=${SP_OS}-$(SPCOMP2_COMPILER)$(CPPSTDSUFFIX)-boost$(subst .,,$(BOOSTVERSSP))
|
||||
|
||||
ifeq (${OSL_SPIREZ},1)
|
||||
OpenImageIO_ROOT := ${REZ_PACKAGE_ROOT}/OpenImageIO/${OPENIMAGEIO_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERSSP}
|
||||
$(info OpenImageIO_ROOT ${OpenImageIO_ROOT})
|
||||
|
||||
|
||||
else ifeq (${OSL_SPCOMP2},1)
|
||||
OpenImageIO_ROOT := $(SPCOMP2_ROOT)/OpenImageIO/$(SPARCH)/v$(OPENIMAGEIO_SPCOMP2_VERSION)
|
||||
else ifeq (${OSL_ARNOLD},1)
|
||||
OpenImageIO_ROOT ?= ${working_dir}/../OpenImageIO_local/dist/${platform}${variant}/
|
||||
else ifneq (${OpenImageIO_ROOT},)
|
||||
# User supplied something
|
||||
endif
|
||||
ifneq ($(OpenImageIO_ROOT),)
|
||||
MY_CMAKE_FLAGS += -DOpenImageIO_ROOT=${OpenImageIO_ROOT}
|
||||
endif
|
||||
|
||||
# Cuda/OptiX
|
||||
USE_OPTIX ?= 1
|
||||
CUDA_VERSION ?= 10.1u2
|
||||
OPTIX_VERSION ?= 6.0.0
|
||||
CUDA_VERSION ?= 11.1.1
|
||||
OPTIX_VERSION ?= 7.2.0
|
||||
# CUDA_TOOLKIT_ROOT_DIR = $(shell rez-env -b cuda-${CUDA_VERSION} ${SPI_COMPILER_PLATFORM} -c "echo '$CUDA_TOOLKIT_ROOT'")
|
||||
CUDA_TOOLKIT_ROOT_DIR ?= /shots/spi/home/lib/arnold/rhel7/cuda_${CUDA_VERSION}
|
||||
CUDA_EXTRA_LIBS ?= ${CUDA_TOOLKIT_ROOT_DIR}/lib64/libnvrtc.so
|
||||
OptiX_ROOT ?= /shots/spi/home/lib/arnold/rhel7/optix_${OPTIX_VERSION}
|
||||
OPTIXHOME = ${OptiX_ROOT}
|
||||
MY_CMAKE_FLAGS += -DUSE_OPTIX=${USE_OPTIX} \
|
||||
@@ -321,53 +166,29 @@ else ifeq (${platform}, macosx)
|
||||
CMAKE_CXX_STANDARD ?= 14
|
||||
USE_SIMD ?= sse4.2
|
||||
MY_CMAKE_FLAGS += -DCMAKE_BUILD_WITH_INSTALL_RPATH=1
|
||||
MY_CMAKE_FLAGS += -DCMAKE_INSTALL_NAME_DIR="${working_dir}/dist/${platform}${variant}/lib"
|
||||
MY_CMAKE_FLAGS += -DCMAKE_INSTALL_NAME_DIR="${working_dir}/dist/lib"
|
||||
|
||||
BOOSTVERSSP=${BOOSTVERS}${BOOSTSPSUFFIX}
|
||||
BOOSTVERS=${BOOSTVERS}${BOOSTSPSUFFIX}
|
||||
LLVM_DIRECTORY ?= /usr/local/opt/llvm
|
||||
|
||||
# A variety of tags can be used to try specific versions of gcc or
|
||||
# clang from the site-specific places we have installed them.
|
||||
ifeq (${COMPILER}, gcc48)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc5)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc6)
|
||||
ifeq (${COMPILER}, gcc6)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc8)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc9)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER},clang6)
|
||||
else ifeq (${COMPILER},clang14)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=/usr/local/Cellar/llvm@6/6.0.1_2/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm@6/6.0.1_2/bin/clang++
|
||||
else ifeq (${COMPILER},clang7)
|
||||
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++
|
||||
else ifeq (${COMPILER},clang15)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=/usr/local/Cellar/llvm@7/7.0.1_1/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm@7/7.0.1_1/bin/clang++
|
||||
else ifeq (${COMPILER},clang8)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=/usr/local/Cellar/llvm@8/8.0.1_1/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/8.0.1/bin/clang++
|
||||
else ifeq (${COMPILER},clang9)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=/usr/local/Cellar/llvm@9/9.0.1/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm@9/9.0.1/bin/clang++
|
||||
else ifeq (${COMPILER},clang10)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=/usr/local/Cellar/llvm/10.0.0/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/10.0.0/bin/clang++
|
||||
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@15/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++
|
||||
else ifeq (${COMPILER},clang)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
else ifeq (${COMPILER},gcc)
|
||||
@@ -387,151 +208,10 @@ else ifeq (${platform}, macosx)
|
||||
# end generic OSX
|
||||
|
||||
else
|
||||
$(error Unknown SP_OS=${SP_OS} platform=${platform})
|
||||
$(error Unknown SP_OS=${SP_OS})
|
||||
endif # endif ${SP_OS}
|
||||
|
||||
|
||||
|
||||
ifeq (${OSL_SPIREZ},1)
|
||||
# Rpath touch-ups
|
||||
# NOTE: This MUST match the order and naming of the Rez variants
|
||||
# set in rez/package.py.in
|
||||
REZ_INSTALL_PATH := ${REZ_PACKAGE_ROOT}/${OSL_REZ_NAME}/${OSL_VERS}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERSSP}/cuda-${CUDA_VERSION}/optix-${OPTIX_VERSION}
|
||||
MY_CMAKE_FLAGS += -DOSL_REZ_INSTALL_PATH=${REZ_INSTALL_PATH}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_INSTALL_RPATH="${REZ_INSTALL_PATH}/lib;@executable_path/../lib;${OpenImageIO_ROOT}/lib"
|
||||
INSTALL_PREFIX := ${working_dir}/dist/${platform}
|
||||
endif
|
||||
|
||||
|
||||
ifneq (${VERBOSE},)
|
||||
$(info MY_CMAKE_FLAGS: $(MY_CMAKE_FLAGS))
|
||||
endif
|
||||
|
||||
|
||||
|
||||
############################################################################
|
||||
# SpComp2 magic incantations follow. Here be dragons.
|
||||
############################################################################
|
||||
|
||||
|
||||
CPPSTDSUFFIX=
|
||||
SPCOMP2_INSTALL_ROOT ?= $(SPCOMP2_ROOT)
|
||||
BOOSTVERSSP?=${BOOSTVERS}${BOOSTSPSUFFIX}
|
||||
SPARCH=${SP_OS}-$(SPCOMP2_COMPILER)$(CPPSTDSUFFIX)-boost$(subst .,,$(BOOSTVERSSP))
|
||||
OIIO_SPCOMP2_PATH := ${SPCOMP2_INSTALL_ROOT}/OpenImageIO/${SPARCH}/v${OPENIMAGEIO_SPCOMP2_VERSION}
|
||||
# $(info New rhel7 OIIO_SPCOMP2_PATH is ${OIIO_SPCOMP2_PATH})
|
||||
|
||||
PYVERNOSPACE=${shell echo ${PYTHON_VERSION} | sed "s/\\.//"}
|
||||
SPPYARCH=$(SPARCH)-py$(PYVERNOSPACE)
|
||||
|
||||
|
||||
|
||||
all: dist
|
||||
|
||||
local: dist
|
||||
|
||||
.PHONY: spcomp2_install spcomp2_install_local clean all
|
||||
|
||||
spi: MY_CMAKE_FLAGS += -DCMAKE_DEBUG_POSTFIX=_d
|
||||
spi: debug dist
|
||||
|
||||
|
||||
|
||||
spcomp2_install_local: SPCOMP2_INSTALL_ROOT = $(SPCOMP2_LOCAL_PATH)
|
||||
spcomp2_install_local: spcomp2_install
|
||||
|
||||
comma:= ,
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
|
||||
#OSL_SPCOMP2_PATH := ${SPCOMP2_INSTALL_ROOT}/OSL/${SP_OS}-${SPCOMP2_COMPILER}$(CPPSTDSUFFIX)-boost${SPCOMP2_BOOSTVERS_SUFFIX}/v${OSL_SPCOMP2_VERSION}
|
||||
#$(info New rhel7 OSL_SPCOMP2_PATH is ${OSL_SPCOMP2_PATH})
|
||||
|
||||
#INSTALL_SPCOMP2_CURRENT = $(SPCOMP2_INSTALL_ROOT)/OSL/$(SPARCH)/v$(OSL_SPCOMP2_VERSION)
|
||||
#INSTALL_BIN_LOCATION = $(INSTALL_SPCOMP2_CURRENT)/bin
|
||||
|
||||
SPCOMP2_RPATH_OPT ?= ${OpenImageIO_ROOT}/lib:${partio_ROOT}/lib
|
||||
SPCOMP2_RPATH_DEBUG ?= ${OpenImageIO_ROOT}/lib:${partio_ROOT}/lib/debug
|
||||
#PYSPCOMP2_RPATH_OPT ?= ${SPCOMP2_RPATH_OPT}:${OSL_SPCOMP2_PATH}/lib:${PYTHON_LIBRARY_DIR}
|
||||
#PYSPCOMP2_RPATH_DEBUG ?= ${SPCOMP2_RPATH_DEBUG}:${OSL_SPCOMP2_PATH}/lib/debug:${PYTHON_LIBRARY_DIR}
|
||||
|
||||
|
||||
|
||||
spcomp2: MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \
|
||||
-DCMAKE_INSTALL_RPATH=$(SPCOMP2_INSTALL_ROOT)/OSL/$(SPARCH)/v$(OSL_SPCOMP2_VERSION)/lib \
|
||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
|
||||
-DPYLIB_INCLUDE_SONAME:BOOL=ON \
|
||||
-DPYLIB_LIB_PREFIX:BOOL=ON \
|
||||
-DPYMODULE_SUFFIX="V${OSL_SPCOMP2_VERSION}"
|
||||
|
||||
spcomp2: dist
|
||||
|
||||
spcomp2_debug: MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \
|
||||
-DCMAKE_INSTALL_RPATH=$(SPCOMP2_INSTALL_ROOT)/OSL/$(SPARCH)/v$(OSL_SPCOMP2_VERSION)/lib \
|
||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
|
||||
-DPYLIB_INCLUDE_SONAME:BOOL=ON \
|
||||
-DPYLIB_LIB_PREFIX:BOOL=ON \
|
||||
-DPYMODULE_SUFFIX="V${OSL_SPCOMP2_VERSION}"
|
||||
|
||||
spcomp2_debug: debug
|
||||
|
||||
spcomp2_install_fixup_rhel7: spcomp2 spcomp2_debug
|
||||
echo $(SPCOMP2_INSTALL_ROOT)
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_OPT} ${dist_dir}/lib/liboslexec${OSL_LIBNAME_SUFFIX}.so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/lib/liboslexec.so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_OPT} ${dist_dir}/lib/liboslcomp${OSL_LIBNAME_SUFFIX}.so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/lib/liboslcomp.so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_OPT} ${dist_dir}/lib/liboslquery${OSL_LIBNAME_SUFFIX}.so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/lib/liboslquery.so
|
||||
# patchelf --set-rpath ${PYSPCOMP2_RPATH_OPT} ${dist_dir}/python/libPyOSL.so
|
||||
# patchelf --set-rpath ${PYSPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/python/libPyOSL.so
|
||||
|
||||
# This goal can't start with 'install' because something elsewhere picks
|
||||
# it up and starts doing bad things
|
||||
spcomp2_install: spcomp2_install_fixup_${SP_OS}
|
||||
perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
--project=oslexec \
|
||||
--version=$(OSL_SPCOMP2_VERSION) \
|
||||
--root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
--arch=$(SPARCH) \
|
||||
--headers=$(subst $(space),$(comma),$(wildcard ${dist_dir}/include/OSL/*)) \
|
||||
--cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread" \
|
||||
--namespace=${NAMESPACE} \
|
||||
--srcdir=${dist_dir}/lib \
|
||||
--builddir_o=${dist_dir}/lib \
|
||||
--builddir_d=${dist_dir}.debug/lib
|
||||
perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
--project=oslquery \
|
||||
--version=$(OSL_SPCOMP2_VERSION) \
|
||||
--root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
--arch=$(SPARCH) \
|
||||
--headers=$(subst $(space),$(comma),$(wildcard ${dist_dir}/include/OSL/*)) \
|
||||
--cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread" \
|
||||
--namespace=${NAMESPACE} \
|
||||
--srcdir=${dist_dir}/lib \
|
||||
--builddir_o=${dist_dir}/lib \
|
||||
--builddir_d=${dist_dir}.debug/lib
|
||||
#perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
# --project=oslcomp \
|
||||
# --version=$(OSL_SPCOMP2_VERSION) \
|
||||
# --root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
# --arch=$(SPARCH) \
|
||||
# --headers=$(subst $(space),$(comma),$(wildcard ${dist_dir}/include/OSL/*)) \
|
||||
# --cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread" \
|
||||
# --namespace=${NAMESPACE} \
|
||||
# --srcdir=${dist_dir}/lib \
|
||||
# --builddir_o=${dist_dir}/lib \
|
||||
# --builddir_d=${dist_dir}.debug/lib
|
||||
#perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
# --project=PyOSL \
|
||||
# --version=$(OSL_SPCOMP2_VERSION) \
|
||||
# --root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
# --arch=$(SPPYARCH) \
|
||||
# --cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread"\
|
||||
# --namespace=${NAMESPACE} \
|
||||
# --srcdir=${dist_dir}/python \
|
||||
# --builddir_o=${dist_dir}/python \
|
||||
# --builddir_d=${dist_dir}.debug/python
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
||||
<!-- Copyright Contributors to the Open Shading Language Project. -->
|
||||
|
||||
Build a variant for Rez/general use
|
||||
-----------------------------------
|
||||
|
||||
Skip this section if you are instead building for SpComp2.
|
||||
|
||||
Note: For testing or to make your own local rez package, you can customize
|
||||
either the rez package name, or the rez install location name, with make
|
||||
flags `OSL_REZ_NAME=blah REZ_PACKAGE_ROOT=/path/to/my/rez/pkgs` appended
|
||||
to the `make` commands of any of the variants listed below. For example,
|
||||
|
||||
make OSL_SPIREZ=1 OSL_REZ_NAME=oiio_test REZ_PACKAGE_ROOT=/path/to/my/rez/pkgs
|
||||
|
||||
|
||||
Variants:
|
||||
|
||||
# C++11/gcc4.8 compat, Python 2.7, Boost 1.55, OptiX 6, Cuda 10.1
|
||||
# OIIO 2.2.0.0, OpenEXR 2.2
|
||||
make nuke
|
||||
make spi OSL_SPIREZ=1 BOOSTVERS=1.55 USE_OPTIX=1 CUDA_VERSION=10.1 OPTIX_VERSION=6.0.0 OPENIMAGEIO_VERSION=2.2.0.0 OPENEXR_VERSION=2.2.0 PYTHON_VERSION=2.7
|
||||
|
||||
# C++11/gcc6.3 compat, Python 2.7, Boost 1.70, OptiX 6, Cuda 10.1
|
||||
# OIIO 2.2.0.0, OpenEXR 2.4
|
||||
make nuke
|
||||
make spi OSL_SPIREZ=1 SPI_COMPILER_PLATFORM=gcc-6.3 BOOSTVERS=1.70 USE_OPTIX=1 CUDA_VERSION=10.1 OPTIX_VERSION=6.0.0 OPENIMAGEIO_VERSION=2.2.0.0 OPENEXR_VERSION=2.4.0 PYTHON_VERSION=2.7
|
||||
|
||||
|
||||
|
||||
You can do any of these on your local machine.
|
||||
|
||||
|
||||
Rez/general release (do for each variant)
|
||||
-----------------------------------------
|
||||
|
||||
This must be done from compile42 (for correct write permissions on certain
|
||||
shared directories), even if you did the build itself locally.
|
||||
|
||||
For any of the variants that you built above:
|
||||
|
||||
( cd dist/rhel7 ; rez release --skip-repo-errors )
|
||||
|
||||
That command will release the dist to the studio.
|
||||
|
||||
|
||||
Appwrapper binary releases
|
||||
--------------------------
|
||||
|
||||
We don't currently do this.
|
||||
|
||||
<!---
|
||||
This step is for the ONE general/rez variant that we believe is the
|
||||
canonical source of command line oslc and oslinfo. After building and
|
||||
releasing as above,
|
||||
|
||||
cp dist/rhel7/OSL_*.xml /shots/spi/home/lib/app_cfg/OSL
|
||||
|
||||
That will make appcfg aware of the release.
|
||||
|
||||
To also make this release the new facility default:
|
||||
|
||||
db-any spi/home/OSL.bin highest /shots/spi/home/lib/app_cfg/OSL/OSL_A.B.C.D.xml
|
||||
|
||||
where A.B.C.D is the version.
|
||||
--->
|
||||
|
||||
|
||||
SpComp2 build and release
|
||||
-------------------------
|
||||
|
||||
Phasing out support for this.
|
||||
@@ -1,20 +1,9 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
option (${PROJ_NAME}_SPIREZ "Enable extra bits for building for SPI Rez install" OFF)
|
||||
set (${PROJ_NAME}_REZ_PACKAGE_NAME CACHE STRING "${PROJECT_NAME}")
|
||||
|
||||
if (${PROJ_NAME}_SPIREZ)
|
||||
message (STATUS "Creating package.py from package.py.in")
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/site/spi/rez/package.py.in" "${CMAKE_BINARY_DIR}/package.py")
|
||||
|
||||
set (appcfg_filename "${CMAKE_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}.xml")
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/site/spi/appcfg.xml.in" "${appcfg_filename}")
|
||||
|
||||
install (FILES ${CMAKE_BINARY_DIR}/package.py
|
||||
"${PROJECT_SOURCE_DIR}/site/spi/rez/CMakeLists.txt"
|
||||
${appcfg_filename}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
COMPONENT developer)
|
||||
endif ()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# This helper script takes a major.minor.patch semantic version string
|
||||
# ("2.1.1") and reformats it into the dot-less zero-padded version like
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(OSL)
|
||||
|
||||
include(RezBuild)
|
||||
|
||||
rez_install_dirs(
|
||||
include lib share
|
||||
# python
|
||||
DESTINATION .
|
||||
)
|
||||
|
||||
# Bin specified separately so it can be marked as EXECUTABLE, otherwise it
|
||||
# installs with only read permissions.
|
||||
rez_install_dirs(
|
||||
bin
|
||||
DESTINATION .
|
||||
EXECUTABLE
|
||||
)
|
||||
|
||||
rez_install_cmake(
|
||||
DESTINATION .
|
||||
INCLUDE_DIRS include
|
||||
LIBRARY_DIRS lib
|
||||
LIBRARIES oslexec oslcomp oslquery
|
||||
oslexec_d oslcomp_d oslquery_d
|
||||
)
|
||||
@@ -1,59 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
#
|
||||
# Documentation on packages and available attributes can be found at:
|
||||
# https://github.com/nerdvegas/rez/wiki/Package-Definition-Guide
|
||||
|
||||
|
||||
name = '@OSL_REZ_PACKAGE_NAME@'
|
||||
|
||||
version = '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.@PROJECT_VERSION_TWEAK@'
|
||||
|
||||
description = \
|
||||
"""
|
||||
Rez package of Open Shading Language (OSL)
|
||||
"""
|
||||
|
||||
authors = ['Larry Gritz <lg@imageworks.com>']
|
||||
|
||||
# Add dependencies to other Rez packages here
|
||||
requires = [
|
||||
'platform-@SP_PLATFORM@', 'arch-@SP_PROC@', 'os-@SP_REZ_OS@',
|
||||
'OpenImageIO-@OPENIMAGEIO_VERSION_MAJOR@.@OPENIMAGEIO_VERSION_MINOR@.@OPENIMAGEIO_VERSION_PATCH@'
|
||||
]
|
||||
|
||||
#build_command = 'python {root}/build.py'
|
||||
|
||||
# Rez has a limitation where it is not possible to add variants to a package that
|
||||
# does not have any: https://github.com/nerdvegas/rez/wiki/Variants#single-variants.
|
||||
# Unless you are 100% certain that your package will NEVER require any variants,
|
||||
# you should define your package with at least one variant.
|
||||
variants = [
|
||||
[
|
||||
'@SPI_COMPILER_PLATFORM@',
|
||||
'python-@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@',
|
||||
'boost-@BOOST_VERS_SP@',
|
||||
'cuda-@CUDA_VERSION@',
|
||||
'optix-@OPTIX_VERSION@'
|
||||
],
|
||||
]
|
||||
|
||||
def commands():
|
||||
# Add import statements here, not at the top of the file!
|
||||
|
||||
# Uncomment if you have executables under bin/
|
||||
env.PATH.append("{root}/bin")
|
||||
env.LD_LIBRARY_PATH.append("{root}/lib")
|
||||
|
||||
# Uncomment if you have Python code under python/
|
||||
env.PYTHONPATH.append("{root}/python")
|
||||
|
||||
# For SpImport.Packages, append the python directory
|
||||
#env.SPIMPORT_PACKAGES.append("{root}/python")
|
||||
|
||||
if building:
|
||||
env.CMAKE_MODULE_PATH.append('{root}')
|
||||
# Add env vars or custom code you want executed only at build time
|
||||
@@ -0,0 +1,28 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright Contributors to the Open Shading Language Project.
|
||||
|
||||
sonar.host.url=https://sonarcloud.io
|
||||
|
||||
# Required metadata
|
||||
sonar.organization=academysoftwarefoundation
|
||||
sonar.projectName=OpenShadingLanguage
|
||||
sonar.projectVersion=1.12
|
||||
sonar.projectKey=AcademySoftwareFoundation_OpenShadingLanguage
|
||||
|
||||
# Project links
|
||||
sonar.links.homepage=https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
sonar.links.ci=https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/actions
|
||||
sonar.links.scm=https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
sonar.links.issue=https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/issues
|
||||
|
||||
# Source properties
|
||||
sonar.sources=src
|
||||
sonar.sourceEncoding=UTF-8
|
||||
sonar.exclusions=src/include/OSL/Imath/*.h,src/build-scripts/*
|
||||
|
||||
# C/C++ analyzer properties
|
||||
sonar.cfamily.build-wrapper-output=build/bw_output
|
||||
sonar.cfamily.gcov.reportsPath=_coverage
|
||||
|
||||
sonar.cfamily.cache.enabled=true
|
||||
sonar.cfamily.cache.path=/tmp/sonarcache
|
||||
@@ -1,273 +0,0 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
PROJECT (openexr)
|
||||
|
||||
SET(OPENEXR_VERSION_MAJOR "2")
|
||||
SET(OPENEXR_VERSION_MINOR "2")
|
||||
SET(OPENEXR_VERSION_PATCH "0")
|
||||
|
||||
SET(OPENEXR_VERSION ${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR}.${OPENEXR_VERSION_PATCH})
|
||||
SET(OPENEXR_VERSION_API ${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
|
||||
|
||||
|
||||
# enable the tests
|
||||
ENABLE_TESTING()
|
||||
|
||||
|
||||
# distro building
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${OPENEXR_VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${OPENEXR_VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${OPENEXR_VERSION_PATCH}")
|
||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${CMAKE_PROJECT_NAME}-${OPENEXR_VERSION}"
|
||||
)
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"/.git*;/.cvs*;${CPACK_SOURCE_IGNORE_FILES}")
|
||||
INCLUDE ( CPack )
|
||||
|
||||
|
||||
|
||||
# Allow the developer to select if Dynamic or Static libraries are built
|
||||
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
|
||||
OPTION (USE_ZLIB_WINAPI "Use ZLib Win API" OFF)
|
||||
OPTION (NAMESPACE_VERSIONING "Use Namespace Versioning" ON)
|
||||
OPTION (BUILD_UTILS "Build the binary/utility programs" ON)
|
||||
OPTION (BUILD_TESTS "Build the tests" ON)
|
||||
|
||||
# Setup osx rpathing
|
||||
SET (CMAKE_MACOSX_RPATH 1)
|
||||
SET (BUILD_WITH_INSTALL_RPATH 1)
|
||||
|
||||
ADD_DEFINITIONS ( -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR="${CMAKE_SOURCE_DIR}/IlmImfTest/" )
|
||||
|
||||
INCLUDE_DIRECTORIES (
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config
|
||||
IlmImf
|
||||
IlmImfUtil
|
||||
exrmaketiled
|
||||
exrenvmap
|
||||
exrmakepreview
|
||||
exrmultiview
|
||||
IlmImfFuzzTest
|
||||
)
|
||||
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
|
||||
IF (NOT WIN32)
|
||||
SET ( PTHREAD_LIB pthread )
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES ( ${ILMBASE_PACKAGE_PREFIX}/include/OpenEXR )
|
||||
LINK_DIRECTORIES ( ${ILMBASE_PACKAGE_PREFIX}/lib )
|
||||
MESSAGE ( "ILMBASE_PACKAGE_PREFIX = " ${ILMBASE_PACKAGE_PREFIX})
|
||||
|
||||
SET (LIB_TYPE STATIC)
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
# User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
|
||||
SET (LIB_TYPE SHARED)
|
||||
IF (WIN32)
|
||||
ADD_DEFINITIONS(-DOPENEXR_DLL)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
IF (USE_ZLIB_WINAPI)
|
||||
ADD_DEFINITIONS(-DZLIB_WINAPI)
|
||||
ENDIF ()
|
||||
|
||||
# Test for GCC-style inline asm support with AVX instructions
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
CHECK_CXX_SOURCE_COMPILES (
|
||||
"
|
||||
int main()
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__SSE2__)
|
||||
int n = 0;
|
||||
int eax = 0;
|
||||
int edx = 0;
|
||||
__asm__(
|
||||
\"xgetbv ;\"
|
||||
\"vzeroupper \"
|
||||
: \"=a\"(eax), \"=d\"(edx) : \"c\"(n) : );
|
||||
#else
|
||||
#error No GCC style inline asm supported for AVX instructions
|
||||
#endif
|
||||
}
|
||||
" HAVE_GCC_INLINE_ASM_AVX)
|
||||
|
||||
# Check if sysconf(_SC_NPROCESSORS_ONLN) can be used for CPU count
|
||||
CHECK_CXX_SOURCE_COMPILES (
|
||||
"
|
||||
#include <unistd.h>
|
||||
int main()
|
||||
{
|
||||
sysconf(_SC_NPROCESSORS_ONLN);
|
||||
}
|
||||
" HAVE_SYSCONF_NPROCESSORS_ONLN)
|
||||
|
||||
|
||||
##########################
|
||||
# OpenEXRConfig.h generation
|
||||
##########################
|
||||
IF (WIN32)
|
||||
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1\n" )
|
||||
ELSEIF (APPLE)
|
||||
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_DARWIN 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#include <string.h>\n" )
|
||||
ELSE ()
|
||||
# Linux
|
||||
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_LINUX_PROCFS 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_LARGE_STACK 1\n" )
|
||||
ENDIF()
|
||||
|
||||
IF (NAMESPACE_VERSIONING)
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 1\n")
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_NAMESPACE Imf\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_${OPENEXR_VERSION_API}\n\n" )
|
||||
ELSE ()
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 0\n")
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_NAMESPACE Imf\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf\n\n" )
|
||||
ENDIF ()
|
||||
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_VERSION_STRING \"${OPENEXR_VERSION}\"\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_PACKAGE_STRING \"OpenEXR ${OPENEXR_VERSION}\"\n" )
|
||||
|
||||
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "
|
||||
#define OPENEXR_VERSION_MAJOR ${OPENEXR_VERSION_MAJOR}
|
||||
#define OPENEXR_VERSION_MINOR ${OPENEXR_VERSION_MINOR}
|
||||
#define OPENEXR_VERSION_PATCH ${OPENEXR_VERSION_PATCH}
|
||||
")
|
||||
|
||||
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "
|
||||
// Version as a single hex number, e.g. 0x01000300 == 1.0.3
|
||||
#define OPENEXR_VERSION_HEX ((OPENEXR_VERSION_MAJOR << 24) | \\
|
||||
(OPENEXR_VERSION_MINOR << 16) | \\
|
||||
(OPENEXR_VERSION_PATCH << 8))\n
|
||||
")
|
||||
|
||||
IF (HAVE_GCC_INLINE_ASM_AVX)
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1\n" )
|
||||
ENDIF()
|
||||
|
||||
IF (HAVE_SYSCONF_NPROCESSORS_ONLN)
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN 1\n" )
|
||||
ENDIF()
|
||||
|
||||
SET (OPENEXR_LIBSUFFIX "")
|
||||
SET (ILMBASE_LIBSUFFIX "")
|
||||
IF (NAMESPACE_VERSIONING)
|
||||
SET ( OPENEXR_LIBSUFFIX "-${OPENEXR_VERSION_API}" )
|
||||
# assume same NAMESPACE_VERSION setting for IlmBase for now
|
||||
SET ( ILMBASE_LIBSUFFIX "-${OPENEXR_VERSION_API}" )
|
||||
ENDIF ()
|
||||
|
||||
##########################
|
||||
# IlmImf library
|
||||
##########################
|
||||
ADD_SUBDIRECTORY ( IlmImf )
|
||||
|
||||
SET_TARGET_PROPERTIES ( IlmImf
|
||||
PROPERTIES
|
||||
VERSION 22.0.0
|
||||
SOVERSION 22
|
||||
OUTPUT_NAME "IlmImf${OPENEXR_LIBSUFFIX}"
|
||||
)
|
||||
|
||||
##########################
|
||||
# IlmImfUtil library
|
||||
##########################
|
||||
ADD_SUBDIRECTORY ( IlmImfUtil )
|
||||
|
||||
SET_TARGET_PROPERTIES ( IlmImfUtil
|
||||
PROPERTIES
|
||||
VERSION 22.0.0
|
||||
SOVERSION 22
|
||||
OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}"
|
||||
)
|
||||
|
||||
##########################
|
||||
# Example Code
|
||||
##########################
|
||||
ADD_SUBDIRECTORY ( IlmImfExamples )
|
||||
|
||||
|
||||
##########################
|
||||
# Tests
|
||||
##########################
|
||||
if (BUILD_TESTS)
|
||||
ADD_SUBDIRECTORY ( IlmImfTest )
|
||||
ADD_SUBDIRECTORY ( IlmImfUtilTest )
|
||||
ADD_SUBDIRECTORY ( IlmImfFuzzTest )
|
||||
endif ()
|
||||
|
||||
|
||||
##########################
|
||||
# Binaries / Utilities
|
||||
##########################
|
||||
if (BUILD_UTILS)
|
||||
ADD_SUBDIRECTORY ( exrheader )
|
||||
ADD_SUBDIRECTORY ( exrmaketiled )
|
||||
ADD_SUBDIRECTORY ( exrstdattr )
|
||||
ADD_SUBDIRECTORY ( exrmakepreview )
|
||||
ADD_SUBDIRECTORY ( exrenvmap )
|
||||
ADD_SUBDIRECTORY ( exrmultiview )
|
||||
ADD_SUBDIRECTORY ( exrmultipart )
|
||||
endif ()
|
||||
|
||||
|
||||
##########################
|
||||
# Installation
|
||||
##########################
|
||||
|
||||
INSTALL ( FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/include/OpenEXR
|
||||
)
|
||||
|
||||
# Documentation
|
||||
INSTALL ( FILES
|
||||
doc/TechnicalIntroduction.pdf
|
||||
doc/ReadingAndWritingImageFiles.pdf
|
||||
doc/OpenEXRFileLayout.pdf
|
||||
doc/MultiViewOpenEXR.pdf
|
||||
doc/InterpretingDeepPixels.pdf
|
||||
doc/TheoryDeepPixels.pdf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/share/doc/OpenEXR-${OPENEXR_VERSION}
|
||||
)
|
||||
|
||||
# Examples
|
||||
INSTALL ( FILES
|
||||
IlmImfExamples/main.cpp
|
||||
IlmImfExamples/drawImage.cpp
|
||||
IlmImfExamples/rgbaInterfaceExamples.cpp
|
||||
IlmImfExamples/rgbaInterfaceTiledExamples.cpp
|
||||
IlmImfExamples/generalInterfaceExamples.cpp
|
||||
IlmImfExamples/lowLevelIoExamples.cpp
|
||||
IlmImfExamples/previewImageExamples.cpp
|
||||
IlmImfExamples/generalInterfaceTiledExamples.cpp
|
||||
IlmImfExamples/generalInterfaceTiledExamples.h
|
||||
IlmImfExamples/drawImage.h
|
||||
IlmImfExamples/rgbaInterfaceExamples.h
|
||||
IlmImfExamples/generalInterfaceExamples.h
|
||||
IlmImfExamples/rgbaInterfaceTiledExamples.h
|
||||
IlmImfExamples/lowLevelIoExamples.h
|
||||
IlmImfExamples/previewImageExamples.h
|
||||
IlmImfExamples/namespaceAlias.h
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/share/doc/OpenEXR-${OPENEXR_VERSION}/examples
|
||||
)
|
||||
|
||||
|
||||
# LG additions
|
||||
if (DEFINED ENV{APPVEYOR})
|
||||
add_definitions ("/W0")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /W0")
|
||||
endif ()
|
||||
@@ -1,273 +0,0 @@
|
||||
# yue.nicholas@gmail.com
|
||||
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR 1)
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h")
|
||||
ADD_EXECUTABLE ( b44ExpLogTable
|
||||
b44ExpLogTable.cpp
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( b44ExpLogTable
|
||||
Half
|
||||
Iex${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB}
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/b44ExpLogTable > ${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h
|
||||
DEPENDS b44ExpLogTable
|
||||
)
|
||||
else ()
|
||||
message (STATUS "Skipping build of b44ExpLogTable.h")
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h")
|
||||
ADD_EXECUTABLE ( dwaLookups
|
||||
dwaLookups.cpp
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( dwaLookups
|
||||
Half
|
||||
Iex${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB}
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/dwaLookups > ${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h
|
||||
DEPENDS dwaLookups
|
||||
)
|
||||
else ()
|
||||
message (STATUS "Skipping build of dwaLookups.h")
|
||||
endif ()
|
||||
|
||||
SET ( ILMIMF_SRCS
|
||||
ImfAttribute.cpp
|
||||
ImfBoxAttribute.cpp
|
||||
ImfCRgbaFile.cpp
|
||||
ImfChannelList.cpp
|
||||
ImfChannelListAttribute.cpp
|
||||
ImfFloatAttribute.cpp
|
||||
ImfFrameBuffer.cpp
|
||||
ImfHeader.cpp
|
||||
ImfIO.cpp
|
||||
ImfInputFile.cpp
|
||||
ImfIntAttribute.cpp
|
||||
ImfLineOrderAttribute.cpp
|
||||
ImfMatrixAttribute.cpp
|
||||
ImfOpaqueAttribute.cpp
|
||||
ImfOutputFile.cpp
|
||||
ImfRgbaFile.cpp
|
||||
ImfStringAttribute.cpp
|
||||
ImfVecAttribute.cpp
|
||||
ImfHuf.cpp
|
||||
ImfThreading.cpp
|
||||
ImfWav.cpp
|
||||
ImfLut.cpp
|
||||
ImfCompressor.cpp
|
||||
ImfRleCompressor.cpp
|
||||
ImfZipCompressor.cpp
|
||||
ImfPizCompressor.cpp
|
||||
ImfB44Compressor.cpp
|
||||
ImfDwaCompressor.cpp
|
||||
ImfMisc.cpp
|
||||
ImfCompressionAttribute.cpp
|
||||
ImfDoubleAttribute.cpp
|
||||
ImfConvert.cpp
|
||||
ImfPreviewImage.cpp
|
||||
ImfPreviewImageAttribute.cpp
|
||||
ImfVersion.cpp
|
||||
ImfChromaticities.cpp
|
||||
ImfChromaticitiesAttribute.cpp
|
||||
ImfKeyCode.cpp
|
||||
ImfKeyCodeAttribute.cpp
|
||||
ImfTimeCode.cpp
|
||||
ImfTimeCodeAttribute.cpp
|
||||
ImfRational.cpp
|
||||
ImfRationalAttribute.cpp
|
||||
ImfFramesPerSecond.cpp
|
||||
ImfStandardAttributes.cpp
|
||||
ImfStdIO.cpp
|
||||
ImfEnvmap.cpp
|
||||
ImfEnvmapAttribute.cpp
|
||||
ImfScanLineInputFile.cpp
|
||||
ImfTiledInputFile.cpp
|
||||
ImfTiledMisc.cpp
|
||||
ImfTiledOutputFile.cpp
|
||||
ImfTiledRgbaFile.cpp
|
||||
ImfTileDescriptionAttribute.cpp
|
||||
ImfTileOffsets.cpp
|
||||
ImfRgbaYca.cpp
|
||||
ImfPxr24Compressor.cpp
|
||||
ImfTestFile.cpp
|
||||
ImfStringVectorAttribute.cpp
|
||||
ImfMultiView.cpp
|
||||
ImfAcesFile.cpp
|
||||
ImfMultiPartOutputFile.cpp
|
||||
ImfGenericOutputFile.cpp
|
||||
ImfOutputPartData.cpp
|
||||
ImfMultiPartInputFile.cpp
|
||||
ImfGenericInputFile.cpp
|
||||
ImfPartType.cpp
|
||||
ImfInputPartData.cpp
|
||||
ImfOutputPart.cpp
|
||||
ImfTiledOutputPart.cpp
|
||||
ImfInputPart.cpp
|
||||
ImfTiledInputPart.cpp
|
||||
ImfDeepScanLineInputPart.cpp
|
||||
ImfDeepScanLineOutputPart.cpp
|
||||
ImfDeepScanLineInputFile.cpp
|
||||
ImfDeepScanLineOutputFile.cpp
|
||||
ImfDeepTiledInputPart.cpp
|
||||
ImfDeepTiledOutputPart.cpp
|
||||
ImfDeepTiledInputFile.cpp
|
||||
ImfDeepTiledOutputFile.cpp
|
||||
ImfDeepFrameBuffer.cpp
|
||||
ImfDeepCompositing.cpp
|
||||
ImfCompositeDeepScanLine.cpp
|
||||
ImfDeepImageStateAttribute.cpp
|
||||
ImfFastHuf.cpp
|
||||
ImfFloatVectorAttribute.cpp
|
||||
ImfRle.cpp
|
||||
ImfSystemSpecific.cpp
|
||||
ImfZip.cpp
|
||||
)
|
||||
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
ADD_DEFINITIONS(-DILMIMF_EXPORTS)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY ( IlmImf ${LIB_TYPE}
|
||||
${ILMIMF_SRCS}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( IlmImf
|
||||
Half
|
||||
Iex${ILMBASE_LIBSUFFIX}
|
||||
Imath${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB} ${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
ADD_DEPENDENCIES ( IlmImf b44ExpLogTable )
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES (
|
||||
ImfB44Compressor.cpp
|
||||
PROPERTIES
|
||||
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h
|
||||
)
|
||||
|
||||
|
||||
ADD_DEPENDENCIES ( IlmImf dwaLookups )
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES (
|
||||
ImfDwaCompressor.cpp
|
||||
PROPERTIES
|
||||
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h
|
||||
)
|
||||
|
||||
# Libraries
|
||||
|
||||
INSTALL ( TARGETS
|
||||
IlmImf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
# Headers
|
||||
INSTALL ( FILES
|
||||
ImfForward.h
|
||||
ImfExport.h
|
||||
ImfAttribute.h
|
||||
ImfBoxAttribute.h
|
||||
ImfCRgbaFile.h
|
||||
ImfChannelList.h
|
||||
ImfChannelListAttribute.h
|
||||
ImfCompressionAttribute.h
|
||||
ImfDoubleAttribute.h
|
||||
ImfFloatAttribute.h
|
||||
ImfFrameBuffer.h
|
||||
ImfHeader.h
|
||||
ImfIO.h
|
||||
ImfInputFile.h
|
||||
ImfIntAttribute.h
|
||||
ImfLineOrderAttribute.h
|
||||
ImfMatrixAttribute.h
|
||||
ImfOpaqueAttribute.h
|
||||
ImfOutputFile.h
|
||||
ImfRgbaFile.h
|
||||
ImfStringAttribute.h
|
||||
ImfVecAttribute.h
|
||||
ImfHuf.h
|
||||
ImfWav.h
|
||||
ImfLut.h
|
||||
ImfArray.h
|
||||
ImfCompression.h
|
||||
ImfLineOrder.h
|
||||
ImfName.h
|
||||
ImfPixelType.h
|
||||
ImfVersion.h
|
||||
ImfXdr.h
|
||||
ImfConvert.h
|
||||
ImfPreviewImage.h
|
||||
ImfPreviewImageAttribute.h
|
||||
ImfChromaticities.h
|
||||
ImfChromaticitiesAttribute.h
|
||||
ImfKeyCode.h
|
||||
ImfKeyCodeAttribute.h
|
||||
ImfTimeCode.h
|
||||
ImfTimeCodeAttribute.h
|
||||
ImfRational.h
|
||||
ImfRationalAttribute.h
|
||||
ImfFramesPerSecond.h
|
||||
ImfStandardAttributes.h
|
||||
ImfEnvmap.h
|
||||
ImfEnvmapAttribute.h
|
||||
ImfInt64.h
|
||||
ImfRgba.h
|
||||
ImfTileDescription.h
|
||||
ImfTileDescriptionAttribute.h
|
||||
ImfTiledInputFile.h
|
||||
ImfTiledOutputFile.h
|
||||
ImfTiledRgbaFile.h
|
||||
ImfRgbaYca.h
|
||||
ImfTestFile.h
|
||||
ImfThreading.h
|
||||
ImfB44Compressor.h
|
||||
ImfStringVectorAttribute.h
|
||||
ImfMultiView.h
|
||||
ImfAcesFile.h
|
||||
ImfMultiPartOutputFile.h
|
||||
ImfGenericOutputFile.h
|
||||
ImfMultiPartInputFile.h
|
||||
ImfGenericInputFile.h
|
||||
ImfPartType.h
|
||||
ImfPartHelper.h
|
||||
ImfOutputPart.h
|
||||
ImfTiledOutputPart.h
|
||||
ImfInputPart.h
|
||||
ImfTiledInputPart.h
|
||||
ImfDeepScanLineOutputFile.h
|
||||
ImfDeepScanLineOutputPart.h
|
||||
ImfDeepScanLineInputFile.h
|
||||
ImfDeepScanLineInputPart.h
|
||||
ImfDeepTiledInputFile.h
|
||||
ImfDeepTiledInputPart.h
|
||||
ImfDeepTiledOutputFile.h
|
||||
ImfDeepTiledOutputPart.h
|
||||
ImfDeepFrameBuffer.h
|
||||
ImfDeepCompositing.h
|
||||
ImfCompositeDeepScanLine.h
|
||||
ImfNamespace.h
|
||||
ImfMisc.h
|
||||
ImfDeepImageState.h
|
||||
ImfDeepImageStateAttribute.h
|
||||
ImfFloatVectorAttribute.h
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/include/OpenEXR
|
||||
)
|
||||
|
||||
Binary file not shown.
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Utility script to download and build cmake
|
||||
#
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
@@ -16,10 +16,25 @@ CMAKE_VERSION=${CMAKE_VERSION:=3.12.4}
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
CMAKE_INSTALL_DIR=${CMAKE_INSTALL_DIR:=${LOCAL_DEPS_DIR}/cmake}
|
||||
|
||||
if [[ `uname` == "Linux" ]] ; then
|
||||
mkdir -p ${CMAKE_INSTALL_DIR} && true
|
||||
if [[ `uname` == "Linux" && `uname -m` == "x86_64" ]] ; then
|
||||
mkdir -p ${CMAKE_INSTALL_DIR} || true
|
||||
curl --location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh" -o "cmake.sh"
|
||||
sh cmake.sh --skip-license --prefix=${CMAKE_INSTALL_DIR}
|
||||
export PATH=${CMAKE_INSTALL_DIR}/bin:$PATH
|
||||
fi
|
||||
|
||||
if [[ `uname` == "Linux" && `uname -m` == "aarch64" ]] ; then
|
||||
mkdir -p ${CMAKE_INSTALL_DIR} || true
|
||||
curl --location https://anaconda.org/conda-forge/cmake/3.17.0/download/linux-aarch64/cmake-3.17.0-h28c56e5_0.tar.bz2 -o cmake-3.17.0-h28c56e5_0.tar.bz2
|
||||
tar -xjf cmake-3.17.0-h28c56e5_0.tar.bz2 -C ${CMAKE_INSTALL_DIR}
|
||||
export PATH=${CMAKE_INSTALL_DIR}/bin:$PATH
|
||||
|
||||
# In case we ever need to build from scratch:
|
||||
# curl --location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz" -o cmake.tar.gz
|
||||
# tar xzf cmake.tar.gz
|
||||
# pushd cmake-${CMAKE_VERSION}
|
||||
# CXX="ccache $CXX" ./bootstrap --parallel=${PARALLEL:=4} --enable-ccache
|
||||
# CXX="ccache $CXX" timeout 2100 time make ${PAR_MAKEFAGS} || true
|
||||
# export PATH=${CMAKE_INSTALL_DIR}/bin:$PWD/bin:$PATH
|
||||
# popd
|
||||
fi
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Utility script to download and build LLVM & clang
|
||||
#
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
@@ -14,7 +14,7 @@ uname
|
||||
|
||||
|
||||
if [[ `uname` == "Linux" ]] ; then
|
||||
LLVM_VERSION=${LLVM_VERSION:=8.0.0}
|
||||
LLVM_VERSION=${LLVM_VERSION:=13.0.0}
|
||||
LLVM_INSTALL_DIR=${LLVM_INSTALL_DIR:=${PWD}/llvm-install}
|
||||
if [[ "$GITHUB_WORKFLOW" != "" ]] ; then
|
||||
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-18.04}
|
||||
@@ -29,7 +29,10 @@ if [[ `uname` == "Linux" ]] ; then
|
||||
fi
|
||||
LLVMTAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-${LLVM_DISTRO_NAME}.tar.xz
|
||||
echo LLVMTAR = $LLVMTAR
|
||||
if [ "$LLVM_VERSION" == "10.0.0" ] ; then
|
||||
if [[ "$LLVM_VERSION" == "10.0.0" ]] || [[ "$LLVM_VERSION" == "11.0.0" ]] \
|
||||
|| [[ "$LLVM_VERSION" == "11.1.0" ]] || [[ "$LLVM_VERSION" == "12.0.0" ]] \
|
||||
|| [[ "$LLVM_VERSION" == "13.0.0" ]] || [[ "$LLVM_VERSION" == "14.0.0" ]] ;
|
||||
then
|
||||
# new
|
||||
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
|
||||
else
|
||||
@@ -43,5 +46,5 @@ if [[ `uname` == "Linux" ]] ; then
|
||||
mv clang+llvm*/* $LLVM_INSTALL_DIR
|
||||
export LLVM_DIRECTORY=$LLVM_INSTALL_DIR
|
||||
export PATH=${LLVM_INSTALL_DIR}/bin:$PATH
|
||||
ls -a $LLVM_DIRECTORY
|
||||
# ls -a $LLVM_DIRECTORY
|
||||
fi
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Utility script to download and build OpenColorIO
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
# Which OCIO to retrieve, how to build it
|
||||
OPENCOLORIO_REPO=${OPENCOLORIO_REPO:=https://github.com/AcademySoftwareFoundation/OpenColorIO.git}
|
||||
OPENCOLORIO_VERSION=${OPENCOLORIO_VERSION:=v1.1.1}
|
||||
|
||||
# Where to install the final results
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
OPENCOLORIO_SOURCE_DIR=${OPENCOLORIO_SOURCE_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO}
|
||||
OPENCOLORIO_BUILD_DIR=${OPENCOLORIO_BUILD_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO-build}
|
||||
OPENCOLORIO_INSTALL_DIR=${OPENCOLORIO_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
OPENCOLORIO_CXX_FLAGS=${OPENCOLORIO_CXX_FLAGS:="-Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"}
|
||||
# Just need libs:
|
||||
OPENCOLORIO_BUILDOPTS="-DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_NUKE=OFF \
|
||||
-DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF \
|
||||
-DOCIO_BUILD_GPU_TESTS=OFF \
|
||||
-DOCIO_BUILD_PYTHON=OFF -DOCIO_BUILD_PYGLUE=OFF \
|
||||
-DOCIO_BUILD_JAVA=OFF \
|
||||
-DBUILD_SHARED_LIBS=${OPENCOLORIO_BUILD_SHARED_LIBS:=ON}"
|
||||
BASEDIR=`pwd`
|
||||
pwd
|
||||
echo "OpenColorIO install dir will be: ${OPENCOLORIO_INSTALL_DIR}"
|
||||
|
||||
mkdir -p ${LOCAL_DEPS_DIR}
|
||||
pushd ${LOCAL_DEPS_DIR}
|
||||
|
||||
# Clone OpenColorIO project from GitHub and build
|
||||
if [[ ! -e ${OPENCOLORIO_SOURCE_DIR} ]] ; then
|
||||
echo "git clone ${OPENCOLORIO_REPO} ${OPENCOLORIO_SOURCE_DIR}"
|
||||
git clone ${OPENCOLORIO_REPO} ${OPENCOLORIO_SOURCE_DIR}
|
||||
fi
|
||||
cd ${OPENCOLORIO_SOURCE_DIR}
|
||||
|
||||
echo "git checkout ${OPENCOLORIO_VERSION} --force"
|
||||
git checkout ${OPENCOLORIO_VERSION} --force
|
||||
mkdir -p ${OPENCOLORIO_BUILD_DIR}
|
||||
cd ${OPENCOLORIO_BUILD_DIR}
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${OPENCOLORIO_INSTALL_DIR} \
|
||||
-DCMAKE_CXX_FLAGS="${OPENCOLORIO_CXX_FLAGS}" \
|
||||
${OPENCOLORIO_BUILDOPTS} ${OPENCOLORIO_SOURCE_DIR}
|
||||
time cmake --build . --config Release --target install
|
||||
popd
|
||||
|
||||
# ls -R ${OPENCOLORIO_INSTALL_DIR}
|
||||
|
||||
#echo "listing .."
|
||||
#ls ..
|
||||
|
||||
# Set up paths. These will only affect the caller if this script is
|
||||
# run with 'source' rather than in a separate shell.
|
||||
export OpenColorIO_ROOT=$OPENCOLORIO_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OPENCOLORIO_INSTALL_DIR}/lib
|
||||
|
||||
@@ -1,76 +1,51 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Utility script to download and build OpenEXR & IlmBase
|
||||
#
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
# Which OpenEXR to retrieve, how to build it
|
||||
OPENEXR_REPO=${OPENEXR_REPO:=https://github.com/openexr/openexr.git}
|
||||
OPENEXR_VERSION=${OPENEXR_VERSION:=2.4.0}
|
||||
OPENEXR_BRANCH=${OPENEXR_BRANCH:=v${OPENEXR_VERSION}}
|
||||
OPENEXR_REPO=${OPENEXR_REPO:=https://github.com/AcademySoftwareFoundation/openexr.git}
|
||||
OPENEXR_VERSION=${OPENEXR_VERSION:=v3.1.1}
|
||||
|
||||
# Where to install the final results
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
OPENEXR_SOURCE_DIR=${OPENEXR_SOURCE_DIR:=${LOCAL_DEPS_DIR}/openexr}
|
||||
OPENEXR_BUILD_DIR=${OPENEXR_BUILD_DIR:=${LOCAL_DEPS_DIR}/openexr-build}
|
||||
OPENEXR_INSTALL_DIR=${OPENEXR_INSTALL_DIR:=${LOCAL_DEPS_DIR}/openexr-install}
|
||||
OPENEXR_INSTALL_DIR=${OPENEXR_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
OPENEXR_BUILD_TYPE=${OPENEXR_BUILD_TYPE:=Release}
|
||||
CMAKE_GENERATOR=${CMAKE_GENERATOR:="Unix Makefiles"}
|
||||
OPENEXR_CMAKE_FLAGS=${OPENEXR_CMAKE_FLAGS:=""}
|
||||
OPENEXR_CXX_FLAGS=${OPENEXR_CXX_FLAGS:=""}
|
||||
BASEDIR=$PWD
|
||||
|
||||
pwd
|
||||
echo "Building OpenEXR ${OPENEXR_BRANCH}"
|
||||
echo "EXR build dir will be: ${OPENEXR_BUILD_DIR}"
|
||||
echo "EXR install dir will be: ${OPENEXR_INSTALL_DIR}"
|
||||
echo "CMAKE_PREFIX_PATH is ${CMAKE_PREFIX_PATH}"
|
||||
echo "Building OpenEXR ${OPENEXR_VERSION}"
|
||||
echo "OpenEXR build dir will be: ${OPENEXR_BUILD_DIR}"
|
||||
echo "OpenEXR install dir will be: ${OPENEXR_INSTALL_DIR}"
|
||||
echo "OpenEXR Build type is ${OPENEXR_BUILD_TYPE}"
|
||||
|
||||
if [[ "$CMAKE_GENERATOR" == "" ]] ; then
|
||||
OPENEXR_GENERATOR_CMD="-G \"$CMAKE_GENERATOR\""
|
||||
fi
|
||||
echo "CMAKE_PREFIX_PATH is ${CMAKE_PREFIX_PATH}"
|
||||
|
||||
# Clone OpenEXR project (including IlmBase) from GitHub and build
|
||||
if [[ ! -e ${OPENEXR_SOURCE_DIR} ]] ; then
|
||||
echo "git clone ${OPENEXR_REPO} ${OPENEXR_SOURCE_DIR}"
|
||||
git clone ${OPENEXR_REPO} ${OPENEXR_SOURCE_DIR}
|
||||
fi
|
||||
|
||||
mkdir -p ${OPENEXR_INSTALL_DIR} && true
|
||||
mkdir -p ${OPENEXR_BUILD_DIR} && true
|
||||
|
||||
pushd ${OPENEXR_SOURCE_DIR}
|
||||
git checkout ${OPENEXR_BRANCH} --force
|
||||
git checkout ${OPENEXR_VERSION} --force
|
||||
|
||||
if [[ ${OPENEXR_BRANCH} == "v2.2.0" ]] || [[ ${OPENEXR_BRANCH} == "v2.2.1" ]] ; then
|
||||
mkdir -p ${OPENEXR_BUILD_DIR}/IlmBase && true
|
||||
mkdir -p ${OPENEXR_BUILD_DIR}/OpenEXR && true
|
||||
cd ${OPENEXR_BUILD_DIR}/IlmBase
|
||||
cmake --config ${OPENEXR_BUILD_TYPE} ${OPENEXR_GENERATOR_CMD} \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
|
||||
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}/IlmBase
|
||||
time cmake --build . --target install --config ${OPENEXR_BUILD_TYPE}
|
||||
cd ${OPENEXR_BUILD_DIR}/OpenEXR
|
||||
cmake --config ${OPENEXR_BUILD_TYPE} ${OPENEXR_GENERATOR_CMD} \
|
||||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}\;${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DBUILD_UTILS=0 -DBUILD_TESTS=0 \
|
||||
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
|
||||
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}/OpenEXR
|
||||
time cmake --build . --target install --config ${OPENEXR_BUILD_TYPE}
|
||||
elif [[ ${OPENEXR_BRANCH} == "v2.3.0" ]] ; then
|
||||
if [[ ${OPENEXR_VERSION} == "v2.3.0" ]] ; then
|
||||
# Simplified setup for 2.3+
|
||||
cd ${OPENEXR_BUILD_DIR}
|
||||
cmake --config ${OPENEXR_BUILD_TYPE} -G "$CMAKE_GENERATOR" \
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
|
||||
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
@@ -83,7 +58,7 @@ elif [[ ${OPENEXR_BRANCH} == "v2.3.0" ]] ; then
|
||||
else
|
||||
# Simplified setup for 2.4+
|
||||
cd ${OPENEXR_BUILD_DIR}
|
||||
cmake --config ${OPENEXR_BUILD_TYPE} -G "$CMAKE_GENERATOR" \
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
|
||||
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
@@ -91,6 +66,8 @@ else
|
||||
-DBUILD_TESTING=0 \
|
||||
-DPYILMBASE_ENABLE=0 \
|
||||
-DOPENEXR_VIEWERS_ENABLE=0 \
|
||||
-DINSTALL_OPENEXR_EXAMPLES=0 \
|
||||
-DOPENEXR_INSTALL_EXAMPLES=0 \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
|
||||
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}
|
||||
@@ -109,5 +86,3 @@ export ILMBASE_LIBRARY_DIR=$OPENEXR_INSTALL_DIR/lib
|
||||
export OPENEXR_LIBRARY_DIR=$OPENEXR_INSTALL_DIR/lib
|
||||
export LD_LIBRARY_PATH=$OPENEXR_ROOT/lib:$LD_LIBRARY_PATH
|
||||
|
||||
export ILMBASE_ROOT_DIR=$OPENEXR_INSTALL_DIR
|
||||
export OPENEXR_ROOT_DIR=$OPENEXR_INSTALL_DIR
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Install OpenImageIO
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
OPENIMAGEIO_REPO=${OPENIMAGEIO_REPO:=OpenImageIO/oiio}
|
||||
OPENIMAGEIO_BRANCH=${OPENIMAGEIO_BRANCH:=master}
|
||||
OPENIMAGEIO_VERSION=${OPENIMAGEIO_VERSION:=release}
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
OPENIMAGEIO_SRCDIR=${OPENIMAGEIO_SRCDIR:=${LOCAL_DEPS_DIR}/OpenImageIO}
|
||||
OPENIMAGEIO_BUILD_DIR=${OPENIMAGEIO_BUILD_DIR:=${OPENIMAGEIO_SRCDIR}/build/$PLATFORM}
|
||||
OPENIMAGEIO_INSTALLDIR=${OPENIMAGEIO_INSTALLDIR:=$OPENIMAGEIO_SRCDIR/dist/$PLATFORM}
|
||||
OPENIMAGEIO_BUILD_DIR=${OPENIMAGEIO_BUILD_DIR:=${OPENIMAGEIO_SRCDIR}/build}
|
||||
OPENIMAGEIO_INSTALLDIR=${OPENIMAGEIO_INSTALLDIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
OPENIMAGEIO_CMAKE_FLAGS=${OPENIMAGEIO_CMAKE_FLAGS:=""}
|
||||
OPENIMAGEIO_BUILD_TYPE=${OPENIMAGEIO_BUILD_TYPE:=Release}
|
||||
OPENIMAGEIO_CXXFLAGS=${OPENIMAGEIO_CXXFLAGS:=""}
|
||||
@@ -27,7 +31,7 @@ mkdir -p ${OPENIMAGEIO_BUILD_DIR} && true
|
||||
|
||||
pushd $OPENIMAGEIO_SRCDIR
|
||||
git fetch --all -p
|
||||
git checkout $OPENIMAGEIO_BRANCH --force
|
||||
git checkout $OPENIMAGEIO_VERSION --force
|
||||
|
||||
if [[ "$USE_SIMD" != "" ]] ; then
|
||||
OPENIMAGEIO_CMAKE_FLAGS="$OPENIMAGEIO_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
|
||||
@@ -38,7 +42,7 @@ fi
|
||||
|
||||
# if [[ "$ARCH" == "windows64" ]] ; then
|
||||
pushd ${OPENIMAGEIO_BUILD_DIR}
|
||||
cmake ../.. -G "$CMAKE_GENERATOR" \
|
||||
cmake .. -G "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_BUILD_TYPE="$OPENIMAGEIO_BUILD_TYPE" \
|
||||
-DCMAKE_INSTALL_PREFIX="$OPENIMAGEIO_INSTALLDIR" \
|
||||
-DPYTHON_VERSION="$PYTHON_VERSION" \
|
||||
@@ -60,4 +64,4 @@ export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages:$P
|
||||
echo "DYLD_LIBRARY_PATH = $DYLD_LIBRARY_PATH"
|
||||
echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
|
||||
echo "OpenImageIO_ROOT $OpenImageIO_ROOT"
|
||||
ls -R $OpenImageIO_ROOT
|
||||
# ls -R $OpenImageIO_ROOT
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
#
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
# Repo and branch/tag/commit of pugixml to download if we don't have it yet
|
||||
PUGIXML_REPO=${PUGIXML_REPO:=https://github.com/zeux/pugixml.git}
|
||||
PUGIXML_VERSION=${PUGIXML_VERSION:=1.10}
|
||||
PUGIXML_BRANCH=${PUGIXML_BRANCH:=v${PUGIXML_VERSION}}
|
||||
PUGIXML_VERSION=${PUGIXML_VERSION:=v1.10}
|
||||
|
||||
# Where to put pugixml repo source (default to the ext area)
|
||||
PUGIXML_SRC_DIR=${PUGIXML_SRC_DIR:=${PWD}/ext/pugixml}
|
||||
# Temp build area (default to a build/ subdir under source)
|
||||
PUGIXML_BUILD_DIR=${PUGIXML_BUILD_DIR:=${PUGIXML_SRC_DIR}/build}
|
||||
# Install area for pugixml (default to ext/dist)
|
||||
PUGIXML_INSTALL_DIR=${PUGIXML_INSTALL_DIR:=${PWD}/ext/dist}
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
PUGIXML_INSTALL_DIR=${PUGIXML_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
#PUGIXML_BUILD_OPTS=${PUGIXML_BUILD_OPTS:=}
|
||||
|
||||
pwd
|
||||
@@ -34,19 +34,19 @@ if [[ ! -e ${PUGIXML_SRC_DIR} ]] ; then
|
||||
git clone ${PUGIXML_REPO} ${PUGIXML_SRC_DIR}
|
||||
fi
|
||||
cd ${PUGIXML_SRC_DIR}
|
||||
echo "git checkout ${PUGIXML_BRANCH} --force"
|
||||
git checkout ${PUGIXML_BRANCH} --force
|
||||
echo "git checkout ${PUGIXML_VERSION} --force"
|
||||
git checkout ${PUGIXML_VERSION} --force
|
||||
|
||||
mkdir -p ${PUGIXML_BUILD_DIR}
|
||||
cd ${PUGIXML_BUILD_DIR}
|
||||
time cmake --config Release \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PUGIXML_INSTALL_DIR} \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTS=OFF \
|
||||
${PUGIXML_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
ls -R ${PUGIXML_INSTALL_DIR}
|
||||
# ls -R ${PUGIXML_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
#echo "listing .."
|
||||
@@ -55,4 +55,4 @@ popd
|
||||
# Set up paths. These will only affect the caller if this script is
|
||||
# run with 'source' rather than in a separate shell.
|
||||
export pugixml_ROOT=$PUGIXML_INSTALL_DIR
|
||||
|
||||
export LD_LIBRARY_PATH=$pugixml_ROOT/lib:$pugixml_ROOT/lib64:$LD_LIBRARY_PATH
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
#
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
# Repo and branch/tag/commit of pybind11 to download if we don't have it yet
|
||||
PYBIND11_REPO=${PYBIND11_REPO:=https://github.com/pybind/pybind11.git}
|
||||
PYBIND11_VERSION=${PYBIND11_VERSION:=2.4.3}
|
||||
PYBIND11_BRANCH=${PYBIND11_BRANCH:=v${PYBIND11_VERSION}}
|
||||
PYBIND11_VERSION=${PYBIND11_VERSION:=v2.8.1}
|
||||
|
||||
# Where to put pybind11 repo source (default to the ext area)
|
||||
PYBIND11_SRC_DIR=${PYBIND11_SRC_DIR:=${PWD}/ext/pybind11}
|
||||
@@ -39,18 +38,22 @@ if [[ ! -e ${PYBIND11_SRC_DIR} ]] ; then
|
||||
git clone ${PYBIND11_REPO} ${PYBIND11_SRC_DIR}
|
||||
fi
|
||||
cd ${PYBIND11_SRC_DIR}
|
||||
echo "git checkout ${PYBIND11_BRANCH} --force"
|
||||
git checkout ${PYBIND11_BRANCH} --force
|
||||
|
||||
echo "git checkout ${PYBIND11_VERSION} --force"
|
||||
git checkout ${PYBIND11_VERSION} --force
|
||||
|
||||
mkdir -p ${PYBIND11_BUILD_DIR}
|
||||
cd ${PYBIND11_BUILD_DIR}
|
||||
time cmake --config Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PYBIND11_INSTALL_DIR} \
|
||||
-DPYBIND11_TEST=OFF \
|
||||
${PYBIND11_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
ls -R ${PYBIND11_INSTALL_DIR}
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PYBIND11_INSTALL_DIR} \
|
||||
-DPYBIND11_TEST=OFF \
|
||||
${PYBIND11_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
|
||||
# ls -R ${PYBIND11_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
#echo "listing .."
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
|
||||
# Important: set -ex causes this whole script to terminate with error if
|
||||
# any command in it fails. This is crucial for CI tests.
|
||||
set -ex
|
||||
|
||||
# This script is run when CI system first starts up.
|
||||
# It expects that ci-setenv.bash was run first, so $PLATFORM and $ARCH
|
||||
# have been set.
|
||||
|
||||
if [[ -e src/build-scripts/ci-setenv.bash ]] ; then
|
||||
source src/build-scripts/ci-setenv.bash
|
||||
fi
|
||||
|
||||
mkdir -p build/$PLATFORM dist/$PLATFORM && true
|
||||
|
||||
if [[ "$USE_SIMD" != "" ]] ; then
|
||||
MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
|
||||
fi
|
||||
if [[ "$DEBUG" == "1" ]] ; then
|
||||
MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug"
|
||||
fi
|
||||
|
||||
pushd build/$PLATFORM
|
||||
cmake ../.. -G "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
||||
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
|
||||
-DCMAKE_INSTALL_PREFIX="$OSL_ROOT" \
|
||||
-DUSE_PYTHON="${USE_PYTHON}" \
|
||||
-DPYTHON_VERSION="$PYTHON_VERSION" \
|
||||
-DCMAKE_INSTALL_LIBDIR="$OSL_ROOT/lib" \
|
||||
-DCMAKE_CXX_STANDARD="$CMAKE_CXX_STANDARD" \
|
||||
$MY_CMAKE_FLAGS -DVERBOSE=1
|
||||
time cmake --build . --target ${BUILDTARGET:=install} --config ${CMAKE_BUILD_TYPE}
|
||||
popd
|
||||
#make $MAKEFLAGS VERBOSE=1 $BUILD_FLAGS config
|
||||
#make $MAKEFLAGS $PAR_MAKEFLAGS $BUILD_FLAGS $BUILDTARGET
|
||||
|
||||
if [[ "$SKIP_TESTS" == "" ]] ; then
|
||||
$OSL_ROOT/bin/testshade --help
|
||||
export OIIO_LIBRARY_PATH=$OSL_ROOT/lib:$OIIO_LIBRARY_PATH
|
||||
TESTSUITE_CLEANUP_ON_SUCCESS=1
|
||||
make $BUILD_FLAGS test
|
||||
fi
|
||||
|
||||
if [[ "$BUILDTARGET" == clang-format ]] ; then
|
||||
git diff --color
|
||||
THEDIFF=`git diff`
|
||||
if [[ "$THEDIFF" != "" ]] ; then
|
||||
echo "git diff was not empty. Failing clang-format or clang-tidy check."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#if [[ "$CODECOV" == 1 ]] ; then
|
||||
# bash <(curl -s https://codecov.io/bash)
|
||||
#fi
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Important: set -ex causes this whole script to terminate with error if
|
||||
# any command in it fails. This is crucial for CI tests.
|
||||
set -ex
|
||||
|
||||
if [[ "$USE_SIMD" != "" ]] ; then
|
||||
OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
|
||||
fi
|
||||
|
||||
if [[ -n "$CODECOV" ]] ; then
|
||||
OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DCODECOV=${CODECOV}"
|
||||
fi
|
||||
|
||||
pushd build
|
||||
cmake .. -G "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
||||
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
|
||||
-DCMAKE_INSTALL_PREFIX="$OSL_ROOT" \
|
||||
-DUSE_PYTHON="${USE_PYTHON:=1}" \
|
||||
-DPYTHON_VERSION="$PYTHON_VERSION" \
|
||||
-DUSE_BATCHED="${USE_BATCHED:=0}" \
|
||||
-DCMAKE_INSTALL_LIBDIR="$OSL_ROOT/lib" \
|
||||
-DCMAKE_CXX_STANDARD="$CMAKE_CXX_STANDARD" \
|
||||
$OSL_CMAKE_FLAGS -DVERBOSE=1
|
||||
|
||||
# Save a copy of the generated files for debugging broken CI builds.
|
||||
mkdir cmake-save || /bin/true
|
||||
cp -r CMake* *.cmake cmake-save
|
||||
|
||||
: ${BUILDTARGET:=install}
|
||||
if [[ "$BUILDTARGET" != "none" ]] ; then
|
||||
echo "Parallel build ${CMAKE_BUILD_PARALLEL_LEVEL} of target ${BUILDTARGET}"
|
||||
time ${OSL_CMAKE_BUILD_WRAPPER} cmake --build . --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
|
||||
fi
|
||||
popd
|
||||
|
||||
if [[ "${DEBUG_CI:=0}" != "0" ]] ; then
|
||||
echo "PATH=$PATH"
|
||||
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
echo "PYTHONPATH=$PYTHONPATH"
|
||||
echo "ldd testshade"
|
||||
ldd $OSL_ROOT/bin/testshade
|
||||
fi
|
||||
|
||||
if [[ "$BUILDTARGET" == clang-format ]] ; then
|
||||
git diff --color
|
||||
THEDIFF=`git diff`
|
||||
if [[ "$THEDIFF" != "" ]] ; then
|
||||
echo "git diff was not empty. Failing clang-format or clang-tidy check."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Run code coverage analysis
|
||||
# This assumes that the build occurred with CODECOV=1 andtests have already
|
||||
# fully run.
|
||||
|
||||
set -ex
|
||||
|
||||
echo "Performing code coverage analysis"
|
||||
mkdir _coverage
|
||||
pushd _coverage
|
||||
|
||||
ls -R ../build/src/
|
||||
|
||||
# Remove files or directories we want to exclude from code coverage analysis,
|
||||
# generally because we don't expect to execute any of their code during our
|
||||
# CI. (Because it's only used interactively, or is fallback code only used
|
||||
# when certain dependencies are not found.) Including these when we know we
|
||||
# won't be calling them during coverage gathering will just make our coverage
|
||||
# percentage look artifically low.
|
||||
rm -f ../build/src/osltoy/CMakeFiles/osltoy.dir/*.cpp.{gcno,gcda}
|
||||
|
||||
|
||||
# The sed command below converts from:
|
||||
# ../build/src/liboslexec/CMakeFiles/oslexec.dir/foo.gcno
|
||||
# to:
|
||||
# ../src/liboslexec/foo.cpp
|
||||
|
||||
for g in $(find ../build -name "*.gcno" -type f); do
|
||||
echo "Processing $g"
|
||||
echo "dirname $g = $(dirname $g) to " `$(echo "$g" | sed -e 's/\/build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\.cpp\.cpp/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')`
|
||||
gcov -l -p -o $(dirname "$g") $(echo "$g" | sed -e 's/\/build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')
|
||||
done
|
||||
popd
|
||||
@@ -2,40 +2,28 @@
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# This script is run when CI system first starts up.
|
||||
# Since it sets many env variables needed by the caller, it should be run
|
||||
# with 'source', not in a separate shell.
|
||||
|
||||
# Figure out the platform
|
||||
if [[ $TRAVIS_OS_NAME == osx || $RUNNER_OS == macOS ]] ; then
|
||||
export ARCH=macosx
|
||||
fi
|
||||
if [[ $TRAVIS_OS_NAME == linux || $RUNNER_OS == Linux || $CIRCLECI == true ]] ; then
|
||||
export ARCH=linux64
|
||||
fi
|
||||
if [[ $RUNNER_OS == Windows ]] ; then
|
||||
export ARCH=windows64
|
||||
fi
|
||||
export PLATFORM=$ARCH
|
||||
|
||||
if [[ "$DEBUG" == 1 ]] ; then
|
||||
export PLATFORM=${PLATFORM}.debug
|
||||
fi
|
||||
|
||||
echo "Architecture is $ARCH"
|
||||
echo "Build platform name is $PLATFORM"
|
||||
|
||||
# Environment variables we always need
|
||||
export USE_CCACHE=1
|
||||
export PATH=/usr/local/bin/_ccache:/usr/lib/ccache:$PATH
|
||||
export USE_CCACHE=${USE_CCACHE:=1}
|
||||
export CCACHE_CPP2=1
|
||||
export OSL_ROOT=$PWD/dist/$PLATFORM
|
||||
export CCACHE_DIR=/tmp/ccache
|
||||
if [[ "${RUNNER_OS}" == "macOS" ]] ; then
|
||||
export CCACHE_DIR=$HOME/.ccache
|
||||
fi
|
||||
mkdir -p $CCACHE_DIR
|
||||
|
||||
export OSL_ROOT=$PWD/dist
|
||||
export DYLD_LIBRARY_PATH=$OSL_ROOT/lib:$DYLD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$OSL_ROOT/lib:$LD_LIBRARY_PATH
|
||||
export OIIO_LIBRARY_PATH=$OSL_ROOT/lib:${OIIO_LIBRARY_PATH}
|
||||
export LSAN_OPTIONS=suppressions=$PWD/src/build-scripts/nosanitize.txt
|
||||
export ASAN_OPTIONS=print_suppressions=0
|
||||
export ASAN_OPTIONS=print_suppressions=0:detect_odr_violation=1
|
||||
|
||||
export USE_PYTHON=${USE_PYTHON:=1}
|
||||
export PYTHON_VERSION=${PYTHON_VERSION:="2.7"}
|
||||
@@ -45,34 +33,44 @@ export PYTHONPATH=$OSL_ROOT/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPAT
|
||||
export BUILD_MISSING_DEPS=${BUILD_MISSING_DEPS:=1}
|
||||
export COMPILER=${COMPILER:=gcc}
|
||||
export CXX=${CXX:=g++}
|
||||
export CI=true
|
||||
export USE_NINJA=1
|
||||
export OSL_CI=true
|
||||
export USE_NINJA=${USE_NINJA:=1}
|
||||
export CMAKE_GENERATOR=${CMAKE_GENERATOR:=Ninja}
|
||||
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}
|
||||
export CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD:=11}
|
||||
|
||||
if [[ $TRAVIS == true ]] ; then
|
||||
export PARALLEL=2
|
||||
elif [[ $CIRCLECI == true ]] ; then
|
||||
export PARALLEL=4
|
||||
elif [[ $GITHUB_ACTIONS == true ]] ; then
|
||||
export PARALLEL=4
|
||||
fi
|
||||
export PARALLEL=${PARALLEL:=4}
|
||||
export PAR_MAKEFLAGS=-j${PARALLEL}
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=${PARALLEL}
|
||||
export CTEST_PARALLEL_LEVEL=${PARALLEL}
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL:=${PARALLEL}}
|
||||
export CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL:=${PARALLEL}}
|
||||
|
||||
export LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=$HOME/ext}
|
||||
export CMAKE_PREFIX_PATH=${LOCAL_DEPS_DIR}:${CMAKE_PREFIX_PATH}
|
||||
export CMAKE_PREFIX_PATH=${LOCAL_DEPS_DIR}/dist:${CMAKE_PREFIX_PATH}
|
||||
export LD_LIBRARY_PATH=${LOCAL_DEPS_DIR}/dist/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=${LOCAL_DEPS_DIR}/dist/lib64:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=${LOCAL_DEPS_DIR}/dist/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
uname -a
|
||||
uname -n
|
||||
export TESTSUITE_CLEANUP_ON_SUCCESS=${TESTSUITE_CLEANUP_ON_SUCCESS:=1}
|
||||
|
||||
mkdir -p build dist
|
||||
|
||||
echo "HOME = $HOME"
|
||||
echo "PWD = $PWD"
|
||||
echo "LOCAL_DEPS_DIR = $LOCAL_DEPS_DIR"
|
||||
echo "uname -a: " `uname -a`
|
||||
echo "uname -m: " `uname -m`
|
||||
echo "uname -s: " `uname -s`
|
||||
echo "uname -n: " `uname -n`
|
||||
echo "nproc " `nproc`
|
||||
pwd
|
||||
ls
|
||||
env | sort
|
||||
|
||||
if [[ $ARCH == linux64 ]] ; then
|
||||
if [[ `uname -s` == "Linux" ]] ; then
|
||||
head -40 /proc/cpuinfo
|
||||
elif [[ $ARCH == macosx ]] ; then
|
||||
elif [[ ${RUNNER_OS} == "macOS" ]] ; then
|
||||
sysctl machdep.cpu.features
|
||||
fi
|
||||
|
||||
# Save the env for use by other stages
|
||||
src/build-scripts/save-env.bash
|
||||
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Important: set -ex causes this whole script to terminate with error if
|
||||
# any command in it fails. This is crucial for CI tests.
|
||||
set -ex
|
||||
|
||||
: ${CTEST_EXCLUSIONS:="broken"}
|
||||
: ${CTEST_TEST_TIMEOUT:=60}
|
||||
|
||||
$OSL_ROOT/bin/testshade --help
|
||||
|
||||
echo "Parallel test ${CTEST_PARALLEL_LEVEL}"
|
||||
echo "Default timeout ${CTEST_TEST_TIMEOUT}"
|
||||
echo "Test exclusions '${CTEST_EXCLUSIONS}'"
|
||||
echo "CTEST_ARGS '${CTEST_ARGS}'"
|
||||
|
||||
pushd build
|
||||
|
||||
ctest -C ${CMAKE_BUILD_TYPE} --force-new-ctest-process --output-on-failure \
|
||||
--timeout ${CTEST_TEST_TIMEOUT} -E "${CTEST_EXCLUSIONS}" ${CTEST_ARGS} \
|
||||
|| \
|
||||
ctest -C ${CMAKE_BUILD_TYPE} --force-new-ctest-process \
|
||||
--rerun-failed --repeat until-pass:5 -R render --output-on-failure \
|
||||
--timeout ${CTEST_TEST_TIMEOUT} -E "${CTEST_EXCLUSIONS}" ${CTEST_ARGS}
|
||||
# The weird construct above allows the render-* tests to run multiple times
|
||||
|
||||
popd
|
||||
|
||||
|
||||
# if [[ "$CODECOV" == 1 ]] ; then
|
||||
# bash <(curl -s https://codecov.io/bash)
|
||||
# fi
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function, absolute_import
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
@@ -73,7 +73,7 @@ from __future__ import print_function, absolute_import
|
||||
###
|
||||
### Only one main doc region will be output by the `docdeep` program,
|
||||
### specified with the `-d` command line argument. Any other doc-regions
|
||||
### will not be included in the documention output of that run.
|
||||
### will not be included in the documentation output of that run.
|
||||
###
|
||||
### However, one doc-region may *include* the text of another doc-region
|
||||
### as follows:
|
||||
@@ -114,7 +114,7 @@ from __future__ import print_function, absolute_import
|
||||
### For pre-code comments, the contiguous comment region associated with
|
||||
### a declaration immediately precedes the declaration. Such a comment
|
||||
### set has its first line start with `///>`. For post-code comments,
|
||||
### the documentaiton comments follows the code declaration, and this is
|
||||
### the documentation comments follows the code declaration, and this is
|
||||
### designated by having its first line start with `///<`. I like to
|
||||
### just remember that the `<` or `>` points in the direction of the code
|
||||
### declaration that the comment applies to.
|
||||
|
||||
Binary file not shown.
@@ -1,60 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
set -ex
|
||||
|
||||
echo "Which g++ " `which g++`
|
||||
g++ --version && true
|
||||
ls /usr/bin/g++* && true
|
||||
/usr/bin/g++ --version && true
|
||||
|
||||
export PATH=/opt/rh/devtoolset-6/root/usr/bin:/usr/local/bin:$PATH
|
||||
#ls /opt/rh/devtoolset-6/root/usr/bin && true
|
||||
#ls /usr/local/bin
|
||||
|
||||
ls /etc/yum.repos.d
|
||||
|
||||
#sudo yum install -y giflib giflib-devel && true
|
||||
sudo yum install -y Field3D Field3D-devel && true
|
||||
|
||||
#sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro && true
|
||||
#sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm && true
|
||||
#sudo yum install -y ffmpeg ffmpeg-devel && true
|
||||
|
||||
|
||||
|
||||
if [[ "$LLVM_BRANCH" != "" || "$LLVM_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_llvm.bash
|
||||
fi
|
||||
|
||||
|
||||
# Build or download LLVM
|
||||
#source src/build-scripts/build_llvm.bash
|
||||
|
||||
source src/build-scripts/build_pybind11.bash
|
||||
|
||||
CXXFLAGS=-fPIC src/build-scripts/build_pugixml.bash
|
||||
|
||||
# Only build OpenEXR if a specific version is requested
|
||||
if [[ "$OPENEXR_BRANCH" != "" || "$OPENEXR_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_openexr.bash
|
||||
fi
|
||||
|
||||
# Only build OpenColorIO if a specific version is requested
|
||||
if [[ "$OCIO_BRANCH" != "" || "$OCIO_VERSION" != "" ]] ; then
|
||||
# Temporary (?) fix: GH ninja having problems, fall back to make
|
||||
CMAKE_GENERATOR="Unix Makefiles" \
|
||||
source src/build-scripts/build_ocio.bash
|
||||
fi
|
||||
|
||||
# Only build OpenImageIO if a specific version is requested
|
||||
if [[ "$OPENIMAGEIO_BRANCH" != "" || "$OPENIMAGEIO_VERSION" != "" ]] ; then
|
||||
# There are many parts of OIIO we don't need to build
|
||||
export ENABLE_iinfo=0 ENABLE_iv=0 ENABLE_igrep=0 ENABLE_iconvert=0 ENABLE_testtex=0
|
||||
export ENABLE_cineon=0 ENABLE_DDS=0 ENABLE_DPX=0 ENABLE_FITS=0
|
||||
export ENABLE_iff=0 ENABLE_jpeg2000=0 ENABLE_PNM=0 ENABLE_PSD=0
|
||||
export ENABLE_RLA=0 ENABLE_SGI=0 ENABLE_SOCKET=0 ENABLE_SOFTIMAGE=0
|
||||
export ENABLE_TARGA=0 ENABLE_WEBP=0
|
||||
export OPENIMAGEIO_MAKEFLAGS="OIIO_BUILD_TESTS=0 USE_OPENGL=0"
|
||||
source src/build-scripts/build_openimageio.bash
|
||||
fi
|
||||
@@ -2,79 +2,183 @@
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
set -ex
|
||||
|
||||
#dpkg --list
|
||||
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
time sudo apt-get update
|
||||
#
|
||||
# Install system packages when those are acceptable for dependencies.
|
||||
#
|
||||
if [[ "$ASWF_ORG" != "" ]] ; then
|
||||
# Using ASWF CentOS container
|
||||
|
||||
time sudo apt-get -q install -y \
|
||||
git \
|
||||
cmake \
|
||||
ninja-build \
|
||||
g++ \
|
||||
ccache \
|
||||
libboost-dev libboost-thread-dev \
|
||||
libboost-filesystem-dev libboost-regex-dev \
|
||||
libtiff-dev \
|
||||
libilmbase-dev libopenexr-dev \
|
||||
python-dev python-numpy \
|
||||
libgif-dev \
|
||||
libpng-dev \
|
||||
flex bison libbison-dev \
|
||||
opencolorio-tools \
|
||||
libsquish-dev \
|
||||
libpugixml-dev \
|
||||
qt5-default
|
||||
export PATH=/opt/rh/devtoolset-6/root/usr/bin:/usr/local/bin:$PATH
|
||||
|
||||
#ls /etc/yum.repos.d
|
||||
|
||||
sudo yum install -y giflib giflib-devel && true
|
||||
# sudo yum install -y ffmpeg ffmpeg-devel && true
|
||||
|
||||
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:$CMAKE_PREFIX_PATH
|
||||
if [[ "${CONAN_LLVM_VERSION}" != "" ]] ; then
|
||||
mkdir conan
|
||||
pushd conan
|
||||
# Simple way to conan install just one package:
|
||||
# conan install clang/${CONAN_LLVM_VERSION}@aswftesting/ci_common1 -g deploy -g virtualenv
|
||||
# But the below method can accommodate multiple requirements:
|
||||
echo "[imports]" >> conanfile.txt
|
||||
echo "., * -> ." >> conanfile.txt
|
||||
echo "[requires]" >> conanfile.txt
|
||||
echo "clang/${CONAN_LLVM_VERSION}@aswftesting/ci_common1" >> conanfile.txt
|
||||
time conan install .
|
||||
echo "--ls--"
|
||||
ls -R .
|
||||
export PATH=$PWD/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
|
||||
export LLVM_ROOT=$PWD
|
||||
popd
|
||||
fi
|
||||
|
||||
if [[ "$CXX" == "g++-4.8" ]] ; then
|
||||
time sudo apt-get install -y g++-4.8
|
||||
elif [[ "$CXX" == "g++-6" ]] ; then
|
||||
time sudo apt-get install -y g++-6
|
||||
elif [[ "$CXX" == "g++-7" ]] ; then
|
||||
time sudo apt-get install -y g++-7
|
||||
elif [[ "$CXX" == "g++-8" ]] ; then
|
||||
time sudo apt-get install -y g++-8
|
||||
elif [[ "$CXX" == "g++-9" ]] ; then
|
||||
time sudo apt-get install -y g++-9
|
||||
elif [[ "$CXX" == "g++-10" ]] ; then
|
||||
time sudo apt-get install -y g++-10
|
||||
if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$CXX" == "icpx" || "$CC" == "icx" || "$USE_ICX" != "" ]] ; then
|
||||
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
|
||||
sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0-3768
|
||||
# Because multiple (possibly newer) versions of oneAPI may be installed,
|
||||
# use a config file to specify compiler and tbb versions
|
||||
# NOTE: oneAPI components have independent version numbering.
|
||||
set +e; source /opt/intel/oneapi/setvars.sh --config oneapi_2022.1.0.cfg; set -e
|
||||
|
||||
if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" ]] ; then
|
||||
echo "Verifying installation of Intel(r) C++ Compiler:"
|
||||
icpc --version
|
||||
fi
|
||||
if [[ "$CXX" == "icpx" || "$CC" == "icx" || "$USE_ICX" != "" ]] ; then
|
||||
echo "Verifying installation of Intel(r) oneAPI DPC++/C++ Compiler:"
|
||||
icpx --version
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
# Using native Ubuntu runner
|
||||
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
time sudo apt-get update
|
||||
|
||||
time sudo apt-get -q install -y \
|
||||
git cmake ninja-build ccache g++ \
|
||||
libboost-dev libboost-thread-dev libboost-filesystem-dev \
|
||||
libilmbase-dev libopenexr-dev \
|
||||
libtiff-dev libgif-dev libpng-dev \
|
||||
flex bison libbison-dev \
|
||||
libpugixml-dev \
|
||||
libopencolorio-dev
|
||||
|
||||
time sudo apt-get -q install -y \
|
||||
qt5-default || /bin/true
|
||||
|
||||
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:$CMAKE_PREFIX_PATH
|
||||
|
||||
# Nonstandard python versions
|
||||
if [[ "${PYTHON_VERSION}" == "3.9" ]] ; then
|
||||
time sudo apt-get -q install -y python3.9-dev python3-numpy
|
||||
pip3 --version
|
||||
pip3 install numpy
|
||||
elif [[ "$PYTHON_VERSION" == "2.7" ]] ; then
|
||||
time sudo apt-get -q install -y python-dev python-numpy
|
||||
else
|
||||
pip3 install numpy
|
||||
fi
|
||||
|
||||
if [[ "$CXX" == "g++-6" ]] ; then
|
||||
time sudo apt-get install -y g++-6
|
||||
elif [[ "$CXX" == "g++-7" ]] ; then
|
||||
time sudo apt-get install -y g++-7
|
||||
elif [[ "$CXX" == "g++-8" ]] ; then
|
||||
time sudo apt-get install -y g++-8
|
||||
elif [[ "$CXX" == "g++-9" ]] ; then
|
||||
time sudo apt-get install -y g++-9
|
||||
elif [[ "$CXX" == "g++-10" ]] ; then
|
||||
time sudo apt-get install -y g++-10
|
||||
elif [[ "$CXX" == "g++-11" ]] ; then
|
||||
time sudo apt-get install -y g++-11
|
||||
elif [[ "$CXX" == "g++-12" ]] ; then
|
||||
time sudo apt-get install -y g++-12
|
||||
fi
|
||||
|
||||
if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$CXX" == "icpx" || "$CC" == "icx" || "$USE_ICX" != "" ]] ; then
|
||||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
time sudo apt-get update
|
||||
time sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic=2022.1.0-3768
|
||||
# Because multiple (possibly newer) versions of oneAPI may be installed,
|
||||
# use a config file to specify compiler and tbb versions
|
||||
# NOTE: oneAPI components have independent version numbering.
|
||||
set +e; source /opt/intel/oneapi/setvars.sh --config oneapi_2022.1.0.cfg; set -e
|
||||
fi
|
||||
|
||||
source src/build-scripts/build_llvm.bash
|
||||
fi
|
||||
|
||||
# time sudo apt-get install -y clang
|
||||
# time sudo apt-get install -y llvm
|
||||
#time sudo apt-get install -y libopenjpeg-dev
|
||||
#time sudo apt-get install -y libjpeg-turbo8-dev
|
||||
|
||||
#dpkg --list
|
||||
|
||||
# Build or download LLVM
|
||||
source src/build-scripts/build_llvm.bash
|
||||
if [[ "$OPTIX_VERSION" != "" ]] ; then
|
||||
echo "Requested OPTIX_VERSION = '${OPTIX_VERSION}'"
|
||||
mkdir -p $LOCAL_DEPS_DIR/dist/include/internal
|
||||
OPTIXLOC=https://developer.download.nvidia.com/redist/optix/v${OPTIX_VERSION}
|
||||
for f in optix.h optix_device.h optix_function_table.h \
|
||||
optix_function_table_definition.h optix_host.h \
|
||||
optix_stack_size.h optix_stubs.h optix_types.h optix_7_device.h \
|
||||
optix_7_host.h optix_7_types.h \
|
||||
internal/optix_7_device_impl.h \
|
||||
internal/optix_7_device_impl_exception.h \
|
||||
internal/optix_7_device_impl_transformations.h
|
||||
do
|
||||
curl --retry 100 -m 120 --connect-timeout 30 \
|
||||
$OPTIXLOC/include/$f > $LOCAL_DEPS_DIR/dist/include/$f
|
||||
done
|
||||
export OptiX_ROOT=$LOCAL_DEPS_DIR/dist
|
||||
fi
|
||||
|
||||
# Build pybind11
|
||||
CXX="ccache $CXX" source src/build-scripts/build_pybind11.bash
|
||||
|
||||
CXXFLAGS=-fPIC src/build-scripts/build_pugixml.bash
|
||||
source src/build-scripts/build_pybind11.bash
|
||||
|
||||
# Build OpenEXR
|
||||
CXX="ccache $CXX" source src/build-scripts/build_openexr.bash
|
||||
if [[ "$OPENEXR_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_openexr.bash
|
||||
fi
|
||||
|
||||
# We don't need OCIO, but if we ever want it, turn this on:
|
||||
#CXX="ccache $CXX" source src/build-scripts/build_ocio.bash
|
||||
# if [[ "$PUGIXML_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_pugixml.bash
|
||||
export MY_CMAKE_FLAGS+=" -DUSE_EXTERNAL_PUGIXML=1 "
|
||||
# fi
|
||||
|
||||
# There are many parts of OIIO we don't need to build
|
||||
export ENABLE_iinfo=0 ENABLE_iv=0 ENABLE_igrep=0 ENABLE_iconvert=0 ENABLE_testtex=0
|
||||
export ENABLE_cineon=0 ENABLE_DDS=0 ENABLE_DPX=0 ENABLE_FITS=0
|
||||
export ENABLE_iff=0 ENABLE_jpeg2000=0 ENABLE_PNM=0 ENABLE_PSD=0
|
||||
export ENABLE_RLA=0 ENABLE_SGI=0 ENABLE_SOCKET=0 ENABLE_SOFTIMAGE=0
|
||||
export ENABLE_TARGA=0 ENABLE_WEBP=0
|
||||
export OPENIMAGEIO_MAKEFLAGS="OIIO_BUILD_TESTS=0 USE_OPENGL=0"
|
||||
source src/build-scripts/build_openimageio.bash
|
||||
if [[ "$OPENCOLORIO_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_opencolorio.bash
|
||||
fi
|
||||
|
||||
if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then
|
||||
# There are many parts of OIIO we don't need to build for OSL's tests
|
||||
export ENABLE_iinfo=0 ENABLE_iv=0 ENABLE_igrep=0
|
||||
export ENABLE_iconvert=0 ENABLE_testtex=0
|
||||
# For speed of compiling OIIO, disable the file formats that we don't
|
||||
# need for OSL's tests
|
||||
export ENABLE_BMP=0 ENABLE_cineon=0 ENABLE_DDS=0 ENABLE_DPX=0 ENABLE_FITS=0
|
||||
export ENABLE_ICO=0 ENABLE_iff=0 ENABLE_jpeg2000=0 ENABLE_PNM=0 ENABLE_PSD=0
|
||||
export ENABLE_RLA=0 ENABLE_SGI=0 ENABLE_SOCKET=0 ENABLE_SOFTIMAGE=0
|
||||
export ENABLE_TARGA=0 ENABLE_WEBP=0
|
||||
# We don't need to run OIIO's tests
|
||||
export OPENIMAGEIO_CMAKE_FLAGS+=" -DOIIO_BUILD_TESTING=OFF -DOIIO_BUILD_TESTS=0"
|
||||
# Don't let warnings in OIIO break OSL's CI run
|
||||
export OPENIMAGEIO_CMAKE_FLAGS+=" -DSTOP_ON_WARNING=OFF"
|
||||
export OPENIMAGEIO_CMAKE_FLAGS+=" -DUSE_OPENGL=0"
|
||||
if [[ $OPENIMAGEIO_VERSION == master && "${OPENIMAGEIO_UNITY:-1}" != "0" ]] ; then
|
||||
# Speed up the OIIO build by doing a "unity" build. (Note: this is
|
||||
# only a savings in CI where there are only 1-2 cores available, and
|
||||
# is only supported for OIIO 2.3.14 and later)
|
||||
export OPENIMAGEIO_CMAKE_FLAGS+=" -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_MODE=BATCH"
|
||||
fi
|
||||
source src/build-scripts/build_openimageio.bash
|
||||
fi
|
||||
|
||||
# Save the env for use by other stages
|
||||
src/build-scripts/save-env.bash
|
||||
|
||||
@@ -2,38 +2,55 @@
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
|
||||
if [[ ! -e build/$PLATFORM ]] ; then
|
||||
mkdir -p build/$PLATFORM
|
||||
fi
|
||||
if [[ ! -e dist/$PLATFORM ]] ; then
|
||||
mkdir -p dist/$PLATFORM
|
||||
fi
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# DEP_DIR="$PWD/ext/dist"
|
||||
DEP_DIR="$PWD/dist/$PLATFORM"
|
||||
DEP_DIR="$PWD/dist"
|
||||
mkdir -p "$DEP_DIR"
|
||||
INT_DIR="build/$PLATFORM"
|
||||
INT_DIR="build"
|
||||
VCPKG_INSTALLATION_ROOT=/c/vcpkg
|
||||
|
||||
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:=.}
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$DEP_DIR"
|
||||
export BOOST_ROOT=${BOOST_ROOT_1_72_0}
|
||||
|
||||
BOOST_UNIX_PATH=$(echo "/$BOOST_ROOT" | sed -e 's/\\/\//g' -e 's/://')
|
||||
echo "BOOST_UNIX_PATH=$BOOST_UNIX_PATH"
|
||||
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$BOOST_ROOT"
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$VCPKG_INSTALLATION_ROOT/installed/x64-windows"
|
||||
export PATH="$PATH:$DEP_DIR/bin:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin:/bin"
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/bin:$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin"
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib"
|
||||
|
||||
# export MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
|
||||
# export OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
|
||||
# export OPENEXR_CMAKE_FLAGS="$OPENEXR_CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
|
||||
|
||||
ls -l "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC"
|
||||
#ls -l "C:/Program Files (x86)/Microsoft Visual Studio/*/Enterprise/VC/Tools/MSVC" && true
|
||||
#ls -l "C:/Program Files (x86)/Microsoft Visual Studio" && true
|
||||
|
||||
|
||||
if [[ "$PYTHON_VERSION" == "3.6" ]] ; then
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.6.8/x64"
|
||||
else
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.7.9/x64"
|
||||
export Python_EXECUTABLE="/c/hostedtoolcache/windows/Python/3.7.9/x64/python.exe"
|
||||
export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages
|
||||
fi
|
||||
pip install numpy
|
||||
|
||||
|
||||
########################################################################
|
||||
# Dependency method #1: Use vcpkg (disabled)
|
||||
#
|
||||
# Currently we are not using this, but here it is for reference:
|
||||
#
|
||||
echo "All pre-installed VCPkg installs:"
|
||||
vcpkg list
|
||||
vcpkg update
|
||||
|
||||
# vcpkg install zlib:x64-windows
|
||||
echo "---------------"
|
||||
# vcpkg update
|
||||
#
|
||||
# # vcpkg install zlib:x64-windows
|
||||
vcpkg install tiff:x64-windows
|
||||
vcpkg install libpng:x64-windows
|
||||
#vcpkg install giflib:x64-windows
|
||||
@@ -46,48 +63,56 @@ vcpkg install libpng:x64-windows
|
||||
# vcpkg install ffmpeg:x64-windows # takes FOREVER!
|
||||
# vcpkg install webp:x64-windows # No such vcpkg package?a
|
||||
|
||||
echo "$VCPKG_INSTALLATION_ROOT"
|
||||
ls "$VCPKG_INSTALLATION_ROOT"
|
||||
echo "$VCPKG_INSTALLATION_ROOT/installed/x64-windows"
|
||||
ls "$VCPKG_INSTALLATION_ROOT/installed/x64-windows"
|
||||
echo "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib"
|
||||
ls "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib"
|
||||
echo "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin"
|
||||
ls "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin"
|
||||
# echo "$VCPKG_INSTALLATION_ROOT"
|
||||
# ls "$VCPKG_INSTALLATION_ROOT"
|
||||
# echo "$VCPKG_INSTALLATION_ROOT/installed/x64-windows"
|
||||
# ls "$VCPKG_INSTALLATION_ROOT/installed/x64-windows"
|
||||
# echo "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib"
|
||||
# ls "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib"
|
||||
# echo "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin"
|
||||
# ls "$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin"
|
||||
|
||||
echo "All VCPkg installs:"
|
||||
vcpkg list
|
||||
#
|
||||
########################################################################
|
||||
|
||||
# curl --location https://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-4.2.1-win64-shared.zip -o ffmpeg-libs.zip
|
||||
# unzip ffmpeg-libs.zip
|
||||
curl --location https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-4.2.1-win64-dev.zip -o ffmpeg-dev.zip
|
||||
unzip ffmpeg-dev.zip
|
||||
ls
|
||||
ls -R *ffmpeg*
|
||||
FFmpeg_ROOT=$PWD/ffmpeg-4.2.1-win64-dev
|
||||
|
||||
########################################################################
|
||||
# Dependency method #2: Build from source ourselves
|
||||
#
|
||||
#
|
||||
|
||||
src/build-scripts/build_zlib.bash
|
||||
export ZLIB_ROOT=$PWD/ext/dist
|
||||
|
||||
src/build-scripts/build_libpng.bash
|
||||
export PNG_ROOT=$PWD/ext/dist
|
||||
|
||||
# We're currently getting libtiff from vcpkg
|
||||
#src/build-scripts/build_libtiff.bash
|
||||
#export TIFF_ROOT=$PWD/ext/dist
|
||||
|
||||
# We're currently getting jpeg from vcpkg
|
||||
# LIBJPEGTURBO_CONFIG_OPTS=-DWITH_SIMD=OFF
|
||||
# # ^^ because we're too lazy to build nasm
|
||||
# src/build-scripts/build_libjpeg-turbo.bash
|
||||
# export JPEGTurbo_ROOT=$PWD/ext/dist
|
||||
|
||||
source src/build-scripts/build_pybind11.bash
|
||||
#export pybind11_ROOT=$PWD/ext/dist
|
||||
|
||||
|
||||
# curl --location https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-4.2.1-win64-dev.zip -o ffmpeg-dev.zip
|
||||
# unzip ffmpeg-dev.zip
|
||||
# FFmpeg_ROOT=$PWD/ffmpeg-4.2.1-win64-dev
|
||||
|
||||
echo "CMAKE_PREFIX_PATH = $CMAKE_PREFIX_PATH"
|
||||
|
||||
mkdir ext
|
||||
|
||||
# ZLib
|
||||
pushd ext
|
||||
git clone -b v1.2.11 https://github.com/madler/zlib.git
|
||||
cd zlib
|
||||
mkdir -p $INT_DIR
|
||||
cd $INT_DIR
|
||||
cmake ../.. -G "$CMAKE_GENERATOR" -DCMAKE_CONFIGURATION_TYPES="$CMAKE_BUILD_TYPE" -DCMAKE_PREFIX_PATH="$DEP_DIR" -DCMAKE_INSTALL_PREFIX="$DEP_DIR"
|
||||
cmake --build . --config $CMAKE_BUILD_TYPE --target install
|
||||
popd
|
||||
export MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DZLIB_LIBRARY=$DEP_DIR/lib/zlib.lib"
|
||||
export OPENEXR_CMAKE_FLAGS="$OPENEXR_CMAKE_FLAGS -DZLIB_LIBRARY=$DEP_DIR/lib/zlib.lib"
|
||||
|
||||
source src/build-scripts/build_pybind11.bash
|
||||
|
||||
OPENEXR_CXX_FLAGS=" /W1 /EHsc /DWIN32=1 "
|
||||
#OPENEXR_BUILD_TYPE=$CMAKE_BUILD_TYPE
|
||||
OPENEXR_INSTALL_DIR=$DEP_DIR
|
||||
OPENEXR_BRANCH=v2.4.0
|
||||
source src/build-scripts/build_openexr.bash
|
||||
export PATH="$OPENEXR_INSTALL_DIR/bin:$OPENEXR_INSTALL_DIR/lib:$PATH"
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PATH
|
||||
@@ -97,7 +122,6 @@ cp $DEP_DIR/lib/*.lib $DEP_DIR/bin
|
||||
cp $DEP_DIR/bin/*.dll $DEP_DIR/lib
|
||||
|
||||
|
||||
#OPENIMAGEIO_REPO=lgritz/oiio
|
||||
#OPENIMAGEIO_BRANCH=lg-cmake312
|
||||
OPENIMAGEIO_INSTALLDIR=$DEP_DIR
|
||||
OPENIMAGEIO_CMAKE_FLAGS+=" -DOIIO_BUILD_TESTS=0 -DOIIO_BUILD_TOOLS=0"
|
||||
@@ -123,12 +147,11 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$VCPKG_INSTALLATION_ROOT/installed/x64-
|
||||
|
||||
# source src/build-scripts/build_openexr.bash
|
||||
# export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$ILMBASE_ROOT;$OPENEXR_ROOT"
|
||||
# source src/build-scripts/build_ocio.bash
|
||||
# source src/build-scripts/build_opencolorio.bash
|
||||
|
||||
|
||||
if [[ "$PYTHON_VERSION" == "3.6" ]] ; then
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.6.8/x64"
|
||||
fi
|
||||
|
||||
# For CI on Windows, prefer to pick up static libs where possible
|
||||
MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DLINKSTATIC=1 -DBUILD_SHARED_LIBS=0"
|
||||
OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DLINKSTATIC=1 -DBUILD_SHARED_LIBS=0"
|
||||
|
||||
# Save the env for use by other stages
|
||||
src/build-scripts/save-env.bash
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# This script, which assumes it is runnign on a Mac OSX with Homebrew
|
||||
# This script, which assumes it is running on a Mac OSX with Homebrew
|
||||
# installed, does a "brew install" in all packages reasonably needed by
|
||||
# OIIO.
|
||||
# OSL and its dependencies.
|
||||
|
||||
if [[ `uname` != "Darwin" ]] ; then
|
||||
echo "Don't run this script unless you are on Mac OSX"
|
||||
@@ -20,25 +20,30 @@ if [[ `which brew` == "" ]] ; then
|
||||
fi
|
||||
|
||||
|
||||
brew update >/dev/null
|
||||
if [[ "$DO_BREW_UPDATE" != "" ]] ; then
|
||||
brew update >/dev/null
|
||||
fi
|
||||
echo ""
|
||||
echo "Before my brew installs:"
|
||||
brew list --versions
|
||||
|
||||
if [[ $PYTHON_VERSION != "2.7" ]] ; then
|
||||
brew uninstall python@2 && true
|
||||
fi
|
||||
brew install --display-times gcc ccache cmake ninja boost && true
|
||||
brew install --display-times -q gcc ccache cmake ninja boost || true
|
||||
brew link --overwrite gcc
|
||||
brew install --display-times python pybind11 && true
|
||||
brew upgrade --display-times python && true
|
||||
brew link --overwrite python
|
||||
brew install --display-times flex bison
|
||||
brew install --display-times libtiff ilmbase openexr
|
||||
brew install --display-times opencolorio partio pugixml
|
||||
brew install --display-times freetype libpng && true
|
||||
brew install --display-times llvm${LLVMBREWVER}
|
||||
brew install --display-times qt
|
||||
brew install --display-times -q python@${PYTHON_VERSION} || true
|
||||
brew unlink python@2.7 || true
|
||||
brew unlink python@3.8 || true
|
||||
brew unlink python@3.9 || true
|
||||
brew unlink python@3.10 || true
|
||||
brew link --overwrite --force python@${PYTHON_VERSION} || true
|
||||
brew upgrade --display-times -q cmake || true
|
||||
brew install --display-times -q ilmbase openexr
|
||||
#brew install --display-times -q freetype
|
||||
brew install --display-times -q opencolorio partio pugixml
|
||||
brew install --display-times -q pybind11 numpy || true
|
||||
brew install --display-times -q tbb || true
|
||||
brew install --display-times -q flex bison
|
||||
brew install --display-times -q llvm${LLVMBREWVER}
|
||||
brew install --display-times -q qt
|
||||
|
||||
echo ""
|
||||
echo "After brew installs:"
|
||||
@@ -56,4 +61,10 @@ fi
|
||||
export PATH=/usr/local/opt/qt5/bin:$PATH
|
||||
export PATH=/usr/local/opt/python/libexec/bin:$PATH
|
||||
export PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
|
||||
export PATH=/usr/local/opt/llvm/bin:$PATH
|
||||
# export PATH=/usr/local/opt/llvm${LLVMBREWVER}/bin:$PATH
|
||||
export LLVM_DIRECTORY=/usr/local/opt/llvm${LLVMBREWVER}
|
||||
export LLVM_ROOT=/usr/local/opt/llvm${LLVMBREWVER}
|
||||
export PATH=/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH
|
||||
|
||||
# Save the env for use by other stages
|
||||
src/build-scripts/save-env.bash
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
leak:Imf_2_2
|
||||
leak:Imf_2_3
|
||||
leak:Imf_2_4
|
||||
leak:libIlmImf
|
||||
leak:oslgram.y
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[oneAPI]
|
||||
name=Intel® oneAPI repository
|
||||
baseurl=https://yum.repos.intel.com/oneapi
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=1
|
||||
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
|
||||
@@ -0,0 +1,3 @@
|
||||
default=exclude
|
||||
compiler=2022.1.0
|
||||
tbb=2021.6.0
|
||||
@@ -5,7 +5,7 @@ includedir=${prefix}/include
|
||||
|
||||
Name: oslcomp
|
||||
Description: oslcomp Compile OSL shaders from source
|
||||
URL: https://github.com/imageworks/OpenShadingLanguage
|
||||
URL: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
Version: @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@
|
||||
Libs: -L${libdir} -loslcomp
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -5,7 +5,7 @@ includedir=${prefix}/include
|
||||
|
||||
Name: oslexec
|
||||
Description: oslexec Execute compiled OSL shaders
|
||||
URL: https://github.com/imageworks/OpenShadingLanguage
|
||||
URL: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
Version: @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@
|
||||
Libs: -L${libdir} -loslexec
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -5,7 +5,7 @@ includedir=${prefix}/include
|
||||
|
||||
Name: oslquery
|
||||
Description: oslquery Query parameters of OSL compiled shaders
|
||||
URL: https://github.com/imageworks/OpenShadingLanguage
|
||||
URL: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
Version: @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@
|
||||
Libs: -L${libdir} -loslquery
|
||||
Cflags: -I${includedir}
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Save the env for use by other stages. Exclude things that we know aren't
|
||||
# needed.
|
||||
printenv \
|
||||
| sort \
|
||||
| grep -v ASWF_ \
|
||||
| grep -v GITHUB_ \
|
||||
| grep -v NVIDIA_ \
|
||||
| grep -v RUNNER_ \
|
||||
| grep -v _= \
|
||||
| fgrep -v "\*" \
|
||||
>> $GITHUB_ENV
|
||||
|
||||
|
||||
echo "save-env: GITHUB_ENV=${GITHUB_ENV}"
|
||||
cat $GITHUB_ENV
|
||||
echo "---------"
|
||||
|
||||
Regular → Executable
+2
-1
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Turn an LLVM-compiled bitfile into a C++ source file where the compiled
|
||||
# bitcode is in a huge array.
|
||||
@@ -1,19 +1,34 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
# add here all the find_dependency() whenever switching to config based
|
||||
# dependencies e.g. if switching to Boost::Boost instead of using
|
||||
# ${Boost_LIBRARY_DIRS} the add:
|
||||
# find_dependency(Boost @Boost_VERSION@)
|
||||
# add here all the find_dependency() whenever switching to config based dependencies
|
||||
if (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 3.0)
|
||||
find_dependency(Imath @Imath_VERSION@)
|
||||
elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONFIG@)
|
||||
find_dependency(IlmBase @OpenEXR_VERSION@)
|
||||
find_dependency(OpenEXR @OpenEXR_VERSION@)
|
||||
find_dependency(ZLIB @ZLIB_VERSION@) # Because OpenEXR doesn't do it
|
||||
find_dependency(Threads) # Because OpenEXR doesn't do it
|
||||
endif ()
|
||||
|
||||
set_and_check (@PROJECT_NAME@_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set_and_check (@PROJECT_NAME@_INCLUDES "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set_and_check (@PROJECT_NAME@_LIB_DIR "@CMAKE_INSTALL_FULL_LIBDIR@")
|
||||
|
||||
find_dependency(OpenImageIO @OpenImageIO_VERSION@ REQUIRED)
|
||||
|
||||
# Compute the installation prefix relative to this file
|
||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
|
||||
|
||||
# There's no guarantee that CMAKE_INSTALL_XXXDIR is a relative path so we extract the final component to handle absolute paths
|
||||
get_filename_component(_INCLUDE_DIR_NAME "@CMAKE_INSTALL_INCLUDEDIR@" NAME)
|
||||
get_filename_component(_LIB_DIR_NAME "@CMAKE_INSTALL_LIBDIR@" NAME)
|
||||
|
||||
set_and_check (@PROJECT_NAME@_INCLUDE_DIR "${_IMPORT_PREFIX}/${_INCLUDE_DIR_NAME}")
|
||||
set_and_check (@PROJECT_NAME@_INCLUDES "${_IMPORT_PREFIX}/${_INCLUDE_DIR_NAME}")
|
||||
set_and_check (@PROJECT_NAME@_LIB_DIR "${_IMPORT_PREFIX}/${_LIB_DIR_NAME}")
|
||||
|
||||
#...logic to determine installedPrefix from the own location...
|
||||
#set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Is the named package "enabled" via our disabling convention? If either
|
||||
# USE_pkgname (or the all-uppercase USE_PKGNAME, or ENABLE_pkgname, or
|
||||
# ENABLE_PKGNAME) exists as either a CMake or environment variable, is
|
||||
# nonempty by contains a non-true/nonnzero value, store false in the
|
||||
# nonempty by contains a non-true/nonzero value, store false in the
|
||||
# variable named by <enablevar>, otherwise store true.
|
||||
function (check_is_enabled pkgname enablevar)
|
||||
string (TOUPPER ${pkgname} pkgname_upper)
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
set (REQUIRED_DEPS "" CACHE STRING
|
||||
"Additional dependencies to consider required (semicolon-separated list, or ALL)")
|
||||
set (OPTIONAL_DEPS "" CACHE STRING
|
||||
"Additional dependencies to consider optional (semicolon-separated list, or ALL)")
|
||||
option (ALWAYS_PREFER_CONFIG "Prefer a dependency's exported config file if it's available" OFF)
|
||||
|
||||
|
||||
# Utility function to list the names and values of all variables matching
|
||||
# the pattern (case-insensitive)
|
||||
function (dump_matching_variables pattern)
|
||||
string (TOLOWER ${pattern} _pattern_lower)
|
||||
get_cmake_property(_allvars VARIABLES)
|
||||
list (SORT _allvars)
|
||||
foreach (_var IN LISTS _allvars)
|
||||
string (TOLOWER ${_var} _var_lower)
|
||||
if (_var_lower MATCHES ${_pattern_lower})
|
||||
message (STATUS " ${_var} = ${${_var}}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
|
||||
|
||||
# checked_find_package(Pkgname ...) is a wrapper for find_package, with the
|
||||
# following extra features:
|
||||
# * If either `USE_Pkgname` or the all-uppercase `USE_PKGNAME` (or
|
||||
# `ENABLE_Pkgname` or `ENABLE_PKGNAME`) exists as either a CMake or
|
||||
# environment variable, is nonempty by contains a non-true/nonzero
|
||||
# value, do not search for or use the package. The optional ENABLE <var>
|
||||
# arguments allow you to override the name of the enabling variable. In
|
||||
# other words, support for the dependency is presumed to be ON, unless
|
||||
# turned off explicitly from one of these sources.
|
||||
# * Print a message if the package is enabled but not found. This is based
|
||||
# on ${Pkgname}_FOUND or $PKGNAME_FOUND.
|
||||
# * Optional DEFINITIONS <string>... are passed to add_definitions if the
|
||||
# package is found.
|
||||
# * Optional SETVARIABLES <id>... is a list of CMake variables to set to
|
||||
# TRUE if the package is found (they will not be set or changed if the
|
||||
# package is not found).
|
||||
# * Optional PRINT <list> is a list of variables that will be printed
|
||||
# if the package is found, if VERBOSE is on.
|
||||
# * Optional DEPS <list> is a list of hard dependencies; for each one, if
|
||||
# dep_FOUND is not true, disable this package with an error message.
|
||||
# * Optional ISDEPOF <downstream> names another package for which the
|
||||
# present package is only needed because it's a dependency, and
|
||||
# therefore if <downstream> is disabled, we don't bother with this
|
||||
# package either.
|
||||
# * Optional VERSION_MIN and VERSION_MAX, if supplied, give minimum and
|
||||
# maximum versions that will be accepted. The min is inclusive, the max
|
||||
# is exclusive (i.e., check for min <= version < max). Note that this is
|
||||
# not the same as providing a version number to find_package, which
|
||||
# checks compatibility, not minimum. Sometimes we really do just want to
|
||||
# say a minimum or a range. (N.B. When our minimum CMake >= 3.19, the
|
||||
# built-in way to do this is with version ranges passed to
|
||||
# find_package.)
|
||||
# * Optional RECOMMEND_MIN, if supplied, gives a minimum recommended
|
||||
# version, accepting but warning if it is below this number (even
|
||||
# if above the true minimum version accepted). The warning message
|
||||
# can give an optional explanation, passed as RECOMMEND_MIN_REASON.
|
||||
# * Optional PREFER_CONFIG, if supplied, tries to use an exported config
|
||||
# file from the package before using a FindPackage.cmake module.
|
||||
# * Optional DEBUG turns on extra debugging information related to how
|
||||
# this package is found.
|
||||
#
|
||||
# N.B. This needs to be a macro, not a function, because the find modules
|
||||
# will set(blah val PARENT_SCOPE) and we need that to be the global scope,
|
||||
# not merely the scope for this function.
|
||||
macro (checked_find_package pkgname)
|
||||
cmake_parse_arguments(_pkg # prefix
|
||||
# noValueKeywords:
|
||||
"REQUIRED;PREFER_CONFIG;DEBUG"
|
||||
# singleValueKeywords:
|
||||
"ENABLE;ISDEPOF;VERSION_MIN;VERSION_MAX;RECOMMEND_MIN;RECOMMEND_MIN_REASON"
|
||||
# multiValueKeywords:
|
||||
"DEFINITIONS;PRINT;DEPS;SETVARIABLES"
|
||||
# argsToParse:
|
||||
${ARGN})
|
||||
string (TOLOWER ${pkgname} pkgname_lower)
|
||||
string (TOUPPER ${pkgname} pkgname_upper)
|
||||
set (_pkg_VERBOSE ${VERBOSE})
|
||||
if (_pkg_DEBUG)
|
||||
set (_pkg_VERBOSE ON)
|
||||
endif ()
|
||||
if (NOT _pkg_VERBOSE)
|
||||
set (${pkgname}_FIND_QUIETLY true)
|
||||
set (${pkgname_upper}_FIND_QUIETLY true)
|
||||
endif ()
|
||||
if ("${pkgname}" IN_LIST REQUIRED_DEPS OR "ALL" IN_LIST REQUIRED_DEPS)
|
||||
set (_pkg_REQUIRED 1)
|
||||
endif ()
|
||||
if ("${pkgname}" IN_LIST OPTIONAL_DEPS OR "ALL" IN_LIST OPTIONAL_DEPS)
|
||||
set (_pkg_REQUIRED 0)
|
||||
endif ()
|
||||
set (_quietskip false)
|
||||
check_is_enabled (${pkgname} _enable)
|
||||
set (_disablereason "")
|
||||
foreach (_dep ${_pkg_DEPS})
|
||||
if (_enable AND NOT ${_dep}_FOUND)
|
||||
set (_enable false)
|
||||
set (ENABLE_${pkgname} OFF PARENT_SCOPE)
|
||||
set (_disablereason "(because ${_dep} was not found)")
|
||||
endif ()
|
||||
endforeach ()
|
||||
if (_pkg_ISDEPOF)
|
||||
check_is_enabled (${_pkg_ISDEPOF} _dep_enabled)
|
||||
if (NOT _dep_enabled)
|
||||
set (_enable false)
|
||||
set (_quietskip true)
|
||||
endif ()
|
||||
endif ()
|
||||
set (_config_status "")
|
||||
if (_enable OR _pkg_REQUIRED)
|
||||
if (${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
|
||||
# was already found
|
||||
elseif (_pkg_PREFER_CONFIG OR ALWAYS_PREFER_CONFIG)
|
||||
find_package (${pkgname} CONFIG ${_pkg_UNPARSED_ARGUMENTS})
|
||||
if (${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
|
||||
set (_config_status "from CONFIG")
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT (${pkgname}_FOUND OR ${pkgname_upper}_FOUND))
|
||||
find_package (${pkgname} ${_pkg_UNPARSED_ARGUMENTS})
|
||||
endif()
|
||||
if ((${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
|
||||
AND ${pkgname}_VERSION
|
||||
AND (_pkg_VERSION_MIN OR _pkg_VERSION_MAX))
|
||||
if ((_pkg_VERSION_MIN AND ${pkgname}_VERSION VERSION_LESS _pkg_VERSION_MIN)
|
||||
OR (_pkg_VERSION_MAX AND ${pkgname}_VERSION VERSION_GREATER _pkg_VERSION_MAX))
|
||||
message (STATUS "${ColorRed}${pkgname} ${${pkgname}_VERSION} is outside the required range ${_pkg_VERSION_MIN}...${_pkg_VERSION_MAX} ${ColorReset}")
|
||||
unset (${pkgname}_FOUND)
|
||||
unset (${pkgname}_VERSION)
|
||||
unset (${pkgname_upper}_FOUND)
|
||||
unset (${pkgname_upper}_VERSION)
|
||||
endif ()
|
||||
endif ()
|
||||
if (${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
|
||||
foreach (_vervar ${pkgname_upper}_VERSION ${pkgname}_VERSION_STRING
|
||||
${pkgname_upper}_VERSION_STRING)
|
||||
if (NOT ${pkgname}_VERSION AND ${_vervar})
|
||||
set (${pkgname}_VERSION ${${_vervar}})
|
||||
endif ()
|
||||
endforeach ()
|
||||
message (STATUS "${ColorGreen}Found ${pkgname} ${${pkgname}_VERSION} ${_config_status}${ColorReset}")
|
||||
add_definitions (${_pkg_DEFINITIONS})
|
||||
foreach (_v IN LISTS _pkg_SETVARIABLES)
|
||||
set (${_v} TRUE)
|
||||
endforeach ()
|
||||
if (_pkg_RECOMMEND_MIN)
|
||||
if (${${pkgname}_VERSION} VERSION_LESS ${_pkg_RECOMMEND_MIN})
|
||||
message (STATUS "${ColorYellow}Recommend ${pkgname} >= ${_pkg_RECOMMEND_MIN} ${_pkg_RECOMMEND_MIN_REASON} ${ColorReset}")
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
message (STATUS "${ColorRed}${pkgname} library not found ${ColorReset}")
|
||||
if (${pkgname}_ROOT)
|
||||
message (STATUS "${ColorRed} ${pkgname}_ROOT was: ${${pkgname}_ROOT} ${ColorReset}")
|
||||
elseif ($ENV{${pkgname}_ROOT})
|
||||
message (STATUS "${ColorRed} ENV ${pkgname}_ROOT was: ${${pkgname}_ROOT} ${ColorReset}")
|
||||
else ()
|
||||
message (STATUS "${ColorRed} Try setting ${pkgname}_ROOT ? ${ColorReset}")
|
||||
endif ()
|
||||
if (EXISTS "${PROJECT_SOURCE_DIR}/src/build-scripts/build_${pkgname}.bash")
|
||||
message (STATUS "${ColorRed} Maybe this will help: src/build-scripts/build_${pkgname}.bash ${ColorReset}")
|
||||
elseif (EXISTS "${PROJECT_SOURCE_DIR}/src/build-scripts/build_${pkgname_upper}.bash")
|
||||
message (STATUS "${ColorRed} Maybe this will help: src/build-scripts/build_${pkgname_upper}.bash ${ColorReset}")
|
||||
elseif (EXISTS "${PROJECT_SOURCE_DIR}/src/build-scripts/build_${pkgname_lower}.bash")
|
||||
message (STATUS "${ColorRed} Maybe this will help: src/build-scripts/build_${pkgname_lower}.bash ${ColorReset}")
|
||||
elseif (EXISTS "${PROJECT_SOURCE_DIR}/src/build-scripts/build_lib${pkgname_lower}.bash")
|
||||
message (STATUS "${ColorRed} Maybe this will help: src/build-scripts/build_lib${pkgname_lower}.bash ${ColorReset}")
|
||||
endif ()
|
||||
if (_pkg_REQUIRED)
|
||||
message (FATAL_ERROR "${ColorRed}${pkgname} is required, aborting.${ColorReset}")
|
||||
endif ()
|
||||
endif()
|
||||
if (_pkg_VERBOSE AND (${pkgname}_FOUND OR ${pkgname_upper}_FOUND OR _pkg_DEBUG))
|
||||
if (_pkg_DEBUG)
|
||||
dump_matching_variables (${pkgname})
|
||||
endif ()
|
||||
set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
|
||||
${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR
|
||||
${pkgname}_INCLUDE_DIRS ${pkgname_upper}_INCLUDE_DIRS
|
||||
${pkgname}_LIBRARIES ${pkgname_upper}_LIBRARIES
|
||||
${_pkg_PRINT})
|
||||
list (REMOVE_DUPLICATES _vars_to_print)
|
||||
foreach (_v IN LISTS _vars_to_print)
|
||||
if (NOT "${${_v}}" STREQUAL "")
|
||||
message (STATUS " ${_v} = ${${_v}}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
else ()
|
||||
if (NOT _quietskip)
|
||||
message (STATUS "${ColorRed}Not using ${pkgname} -- disabled ${_disablereason} ${ColorReset}")
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
# Define color codes for pretty terminal output
|
||||
|
||||
+143
-116
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
@@ -27,11 +27,13 @@ message (STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
|
||||
###########################################################################
|
||||
# C++ language standard
|
||||
#
|
||||
set (CMAKE_CXX_STANDARD 11 CACHE STRING
|
||||
"C++ standard to prefer (11, 14, 17, 20, etc.)")
|
||||
set (CMAKE_CXX_STANDARD 14 CACHE STRING
|
||||
"C++ standard to build with (14, 17, 20, etc.)")
|
||||
set (DOWNSTREAM_CXX_STANDARD 14 CACHE STRING
|
||||
"C++ minimum standard to impose on downstream clients")
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||
message (STATUS "Building for C++${CMAKE_CXX_STANDARD}")
|
||||
message (STATUS "Building with C++${CMAKE_CXX_STANDARD}, downstream minimum C++${DOWNSTREAM_CXX_STANDARD}")
|
||||
|
||||
|
||||
###########################################################################
|
||||
@@ -49,7 +51,8 @@ else ()
|
||||
set (GCC_VERSION 0)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lang")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lang"
|
||||
OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
|
||||
# If using any flavor of clang, set CMAKE_COMPILER_IS_CLANG. If it's
|
||||
# Apple's variety, set CMAKE_COMPILER_IS_APPLECLANG and
|
||||
# APPLECLANG_VERSION_STRING, otherwise for generic clang set
|
||||
@@ -63,6 +66,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lan
|
||||
if (VERBOSE)
|
||||
message (STATUS "The compiler is Clang: ${CMAKE_CXX_COMPILER_ID} version ${APPLECLANG_VERSION_STRING}")
|
||||
endif ()
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
|
||||
set (CMAKE_COMPILER_IS_INTELCLANG 1)
|
||||
string (REGEX MATCH "[0-9]+(\\.[0-9]+)+" INTELCLANG_VERSION_STRING ${clang_full_version_string})
|
||||
if (VERBOSE)
|
||||
message (STATUS "The compiler is Intel Clang: ${CMAKE_CXX_COMPILER_ID} version ${INTELCLANG_VERSION_STRING}")
|
||||
endif ()
|
||||
else ()
|
||||
string (REGEX REPLACE ".* version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string})
|
||||
if (VERBOSE)
|
||||
@@ -80,18 +89,23 @@ endif ()
|
||||
###########################################################################
|
||||
# Turn on more detailed warnings and optionally consider warnings as errors
|
||||
#
|
||||
option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
|
||||
if (NOT ${PROJECT_NAME}_SUPPORTED_RELEASE OR DEFINED ENV{${PROJECT_NAME}_CI})
|
||||
# For development branches (i.e., not a supported release), or when
|
||||
# running CI, default to treating all warnings as errors.
|
||||
option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
|
||||
else ()
|
||||
# For release branches not doing a CI build default to just printing
|
||||
# warnings but not letting them stop the build.
|
||||
option (STOP_ON_WARNING "Stop building if there are any compiler warnings" OFF)
|
||||
endif()
|
||||
option (EXTRA_WARNINGS "Enable lots of extra pedantic warnings" OFF)
|
||||
if (NOT MSVC)
|
||||
add_compile_options ("-Wall")
|
||||
if (EXTRA_WARNINGS)
|
||||
add_compile_options ("-Wextra")
|
||||
endif ()
|
||||
if (STOP_ON_WARNING OR DEFINED ENV{CI})
|
||||
if (STOP_ON_WARNING)
|
||||
add_compile_options ("-Werror")
|
||||
# N.B. Force CI builds (Travis defines $CI) to use -Werror, even if
|
||||
# STOP_ON_WARNING has been switched off by default, which we may do
|
||||
# in release branches.
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -111,12 +125,12 @@ set (CXX_VISIBILITY_PRESET "hidden" CACHE STRING "Symbol visibility (hidden or d
|
||||
option (VISIBILITY_INLINES_HIDDEN "Hide symbol visibility of inline functions" ON)
|
||||
set (VISIBILITY_MAP_FILE "${PROJECT_SOURCE_DIR}/src/build-scripts/hidesymbols.map" CACHE FILEPATH "Visibility map file")
|
||||
set (C_VISIBILITY_PRESET ${CXX_VISIBILITY_PRESET})
|
||||
if (${CXX_VISIBILITY_PRESET} STREQUAL "hidden" AND
|
||||
if (${CXX_VISIBILITY_PRESET} STREQUAL "hidden" AND VISIBILITY_MAP_FILE AND
|
||||
(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) AND
|
||||
(CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU"))
|
||||
# Linux/FreeBSD/Hurd: also hide all the symbols of dependent libraries
|
||||
# to prevent clashes if an app using this project is linked against
|
||||
# other verions of our dependencies.
|
||||
# other versions of our dependencies.
|
||||
set (VISIBILITY_MAP_COMMAND "-Wl,--version-script=${VISIBILITY_MAP_FILE}")
|
||||
endif ()
|
||||
|
||||
@@ -135,6 +149,7 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG)
|
||||
add_compile_options ("-Wno-unused-private-field")
|
||||
add_compile_options ("-Wno-tautological-compare")
|
||||
add_compile_options ("-Wno-unknown-pragmas")
|
||||
add_compile_options ("-Wno-format-security")
|
||||
# disable warning about unused command line arguments
|
||||
add_compile_options ("-Qunused-arguments")
|
||||
# Don't warn if we ask it not to warn about warnings it doesn't know
|
||||
@@ -144,9 +159,16 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG)
|
||||
add_compile_options ("-Wno-unused-local-typedefs")
|
||||
endif ()
|
||||
if (CLANG_VERSION_STRING VERSION_GREATER_EQUAL 3.9)
|
||||
# Don't warn about using unknown preprocessor symbols in #if'set
|
||||
# Don't warn about using unknown preprocessor symbols in `#if`
|
||||
add_compile_options ("-Wno-expansion-to-defined")
|
||||
endif ()
|
||||
# Suppress warnings about our strategic use of bitwise operations in place
|
||||
# of logical operators to produce branchless code in some places.
|
||||
if (CLANG_VERSION_STRING VERSION_GREATER_EQUAL 14.0
|
||||
OR INTELCLANG_VERSION_STRING VERSION_GREATER_EQUAL 14.0)
|
||||
add_compile_options ("-Wno-bitwise-instead-of-logical")
|
||||
endif ()
|
||||
|
||||
# disable warning in flex-generated code
|
||||
add_compile_options ("-Wno-null-conversion")
|
||||
add_compile_options ("-Wno-error=strict-overflow")
|
||||
@@ -174,9 +196,14 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
add_compile_options ("-fno-math-errno")
|
||||
endif ()
|
||||
|
||||
if (INTELCLANG_VERSION_STRING VERSION_GREATER_EQUAL 2022.1.0)
|
||||
# New versions of icx warn about changing certain floating point options
|
||||
add_compile_options ("-Wno-overriding-t-option")
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
# Microsoft specific options
|
||||
add_compile_options (/W1)
|
||||
string (REGEX REPLACE "/W[1-4]" "/W1" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
add_definitions (-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
|
||||
@@ -191,6 +218,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
|
||||
endif ()
|
||||
|
||||
|
||||
# Remember the -std flags we need will be used later for custom Cuda builds
|
||||
set (CSTD_FLAGS "")
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_INTEL)
|
||||
set (CSTD_FLAGS "-std=c++${CMAKE_CXX_STANDARD}")
|
||||
@@ -198,25 +226,47 @@ endif ()
|
||||
|
||||
|
||||
|
||||
# We will use this for ccache and timing
|
||||
set (MY_RULE_LAUNCH "")
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Use ccache if found
|
||||
#
|
||||
# This can really speed up compilation by caching object files that have
|
||||
# been compiled previously with idential arguments and inputs. Putting this
|
||||
# been compiled previously with identical arguments and inputs. Putting this
|
||||
# logic here makes it work even if the user is unaware of ccache. If it's
|
||||
# not found on the system, it will simply be silnetly not used.
|
||||
# not found on the system, it will simply be silently not used.
|
||||
option (USE_CCACHE "Use ccache if found" ON)
|
||||
find_program (CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND AND USE_CCACHE)
|
||||
if (CMAKE_COMPILER_IS_CLANG AND USE_QT AND (NOT DEFINED ENV{CCACHE_CPP2}))
|
||||
message (STATUS "Ignoring ccache because clang + Qt + env CCACHE_CPP2 is not set")
|
||||
else ()
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
set (MY_RULE_LAUNCH ccache)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Build time debugging aid: time all compile & link commands
|
||||
#
|
||||
# Note, though, that this is not especially helpful when doing a parallel
|
||||
# build. If you wish to time individual compile commands, it's best to also
|
||||
# set `-j 1` or CMAKE_BUILD_PARALLEL_LEVEL to 1.
|
||||
option (TIME_COMMANDS "Time each compile and link command" OFF)
|
||||
if (TIME_COMMANDS)
|
||||
set (MY_RULE_LAUNCH "${CMAKE_COMMAND} -E time ${MY_RULE_LAUNCH}")
|
||||
endif ()
|
||||
|
||||
|
||||
# Note: This must be after any option that alters MY_RULE_LAUNCH
|
||||
if (MY_RULE_LAUNCH)
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${MY_RULE_LAUNCH})
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ${MY_RULE_LAUNCH})
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Option to force use of libc++ (the LLVM project's alternate C++ standard
|
||||
# library). Currently this only has an effect if using clang as the
|
||||
@@ -249,8 +299,8 @@ endif ()
|
||||
###########################################################################
|
||||
# SIMD and machine architecture options.
|
||||
#
|
||||
# The USE_SIMD optinon may be set to a comma-separated list of machine /
|
||||
# instruction set optinos, such as "avx3,f16c". The list will be parsed and
|
||||
# The USE_SIMD option may be set to a comma-separated list of machine /
|
||||
# instruction set options, such as "avx3,f16c". The list will be parsed and
|
||||
# the proper compiler directives added to generate code for those ISA
|
||||
# capabilities.
|
||||
#
|
||||
@@ -283,6 +333,33 @@ if (NOT USE_SIMD STREQUAL "")
|
||||
add_compile_options (${SIMD_COMPILE_FLAGS})
|
||||
endif ()
|
||||
|
||||
###########################################################################
|
||||
# Batched SIMD shader execution options.
|
||||
#
|
||||
# The USE_BATCHED option may be set to indicate that support for batched
|
||||
# SIMD shader execution be compiled along with targe specific libraries
|
||||
set (USE_BATCHED "" CACHE STRING "Build batched SIMD shader execution for (0, b8_AVX, b8_AVX2, b8_AVX2_noFMA, b8_AVX512, b8_AVX512_noFMA, b16_AVX512, b16_AVX512_noFMA)")
|
||||
option (VEC_REPORT "Enable compiler's reporting system for vectorization" OFF)
|
||||
set (BATCHED_SUPPORT_DEFINES "")
|
||||
set (BATCHED_TARGET_LIBS "")
|
||||
set (BUILD_BATCHED False)
|
||||
if (NOT USE_BATCHED STREQUAL "")
|
||||
message (STATUS "Compiling with batched SIMD targets ${USE_BATCHED}")
|
||||
if (NOT USE_BATCHED STREQUAL "0")
|
||||
set (BUILD_BATCHED 1)
|
||||
string (REPLACE "," ";" BATCHED_TARGET_LIST ${USE_BATCHED})
|
||||
foreach (batched_target ${BATCHED_TARGET_LIST})
|
||||
if (VERBOSE)
|
||||
message (STATUS "BATCHED target: ${batched_target}")
|
||||
endif ()
|
||||
set (BATCHED_SUPPORT_DEFINES ${BATCHED_SUPPORT_DEFINES} "__OSL_SUPPORTS_${batched_target}")
|
||||
endforeach()
|
||||
else ()
|
||||
message (STATUS "Compiling with NO batched SIMD targets, USE_BATCHED=0")
|
||||
endif ()
|
||||
else ()
|
||||
message (STATUS "Compiling with NO batched SIMD targets, USE_BATCHED is empty")
|
||||
endif ()
|
||||
|
||||
###########################################################################
|
||||
# Preparation to test for compiler/language features
|
||||
@@ -292,26 +369,6 @@ endif ()
|
||||
include (CMakePushCheckState)
|
||||
include (CheckCXXSourceRuns)
|
||||
|
||||
###########################################################################
|
||||
# Find out if it's safe for us to use std::regex or if we need boost.regex.
|
||||
# This is primarily about gcc 4.8 having a broken regex implementation.
|
||||
# This will be obsolete once our minimum supported gcc is >= 4.9.
|
||||
#
|
||||
cmake_push_check_state ()
|
||||
check_cxx_source_runs("
|
||||
#include <regex>
|
||||
int main() {
|
||||
std::string r = std::regex_replace(std::string(\"abc\"), std::regex(\"b\"), \" \");
|
||||
return r == \"a c\" ? 0 : -1;
|
||||
}"
|
||||
USE_STD_REGEX)
|
||||
cmake_pop_check_state ()
|
||||
if (USE_STD_REGEX)
|
||||
add_definitions (-DUSE_STD_REGEX)
|
||||
else ()
|
||||
add_definitions (-DUSE_BOOST_REGEX)
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Code coverage options
|
||||
@@ -319,11 +376,9 @@ endif ()
|
||||
option (CODECOV "Build code coverage tests" OFF)
|
||||
if (CODECOV AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
|
||||
message (STATUS "Compiling for code coverage analysis")
|
||||
add_compile_options ("-ftest-coverage -fprofile-arcs -O0")
|
||||
add_compile_options (-ftest-coverage -fprofile-arcs)
|
||||
add_definitions ("-D${PROJ_NAME}_CODE_COVERAGE=1")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
link_libraries(gcov)
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -337,22 +392,9 @@ if (SANITIZE AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
|
||||
foreach (feature ${SANITIZE_FEATURE_LIST})
|
||||
message (STATUS " sanitize feature: ${feature}")
|
||||
add_compile_options (-fsanitize=${feature})
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${feature}")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=${feature}")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=${feature}")
|
||||
add_link_options (-fsanitize=${feature})
|
||||
endforeach()
|
||||
add_compile_options (-g -fno-omit-frame-pointer)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set (SANITIZE_ON_LINUX 1)
|
||||
endif ()
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_compile_options ("-fuse-ld=gold")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set (SANITIZE_LIBRARIES "asan;pthread")
|
||||
# set (SANITIZE_LIBRARIES "asan" "ubsan")
|
||||
endif()
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
# turn on glibcxx extra annotations to find vector writes past end
|
||||
add_definitions ("-D_GLIBCXX_SANITIZE_VECTOR=1")
|
||||
@@ -414,62 +456,46 @@ endif ()
|
||||
# correct any deviations. If clang-format is found on the system, a
|
||||
# "clang-format" build target will trigger a reformatting.
|
||||
#
|
||||
set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
|
||||
set (CLANG_FORMAT_INCLUDES # "src/*.h" "src/*.cpp"
|
||||
"src/include/*.h"
|
||||
"src/liboslcomp/*.cpp"
|
||||
"src/liboslcomp/*.h"
|
||||
"src/liboslquery/*.cpp"
|
||||
"src/liboslquery/*.h"
|
||||
"src/oslinfo/*.cpp"
|
||||
"src/oslc/*.cpp"
|
||||
"src/osl.imageio/*.cpp"
|
||||
"src/osltoy/*.cpp"
|
||||
"src/osltoy/*.h"
|
||||
CACHE STRING "Glob patterns to include for clang-format")
|
||||
set (CLANG_FORMAT_EXCLUDES
|
||||
# Files "imported and modified" that we don't want to reformat, so
|
||||
# they continue to match their upstream versions.
|
||||
"src/include/OSL/Imathx/*"
|
||||
"src/include/OSL/matrix22.h"
|
||||
# Files that are currently being modified with the SIMD batch
|
||||
# shading -- we'll reformat those only after that project work is
|
||||
# completed, to avoid nasty merge conflicts.
|
||||
"src/include/OSL/rendererservices.h"
|
||||
"src/include/OSL/*llvm*"
|
||||
"src/liboslexec/*llvm*"
|
||||
"src/liboslexec/oslexec_pvt.h"
|
||||
# Files that are currently being modified with the OptiX work --
|
||||
# we'll reformat those only after that project work is completed, to
|
||||
# avoid nasty merge conflicts.
|
||||
"src/include/OSL/device_string.h"
|
||||
"src/include/OSL/oslexec.h"
|
||||
"src/testrender/cuda/*"
|
||||
""
|
||||
CACHE STRING "Glob patterns to exclude for clang-format")
|
||||
find_program (CLANG_FORMAT_EXE
|
||||
NAMES clang-format bin/clang-format
|
||||
HINTS ${CLANG_FORMAT_EXE_HINT} ENV CLANG_FORMAT_EXE_HINT
|
||||
ENV LLVM_DIRECTORY
|
||||
NO_DEFAULT_PATH
|
||||
DOC "Path to clang-format executable")
|
||||
find_program (CLANG_FORMAT_EXE NAMES clang-format bin/clang-format)
|
||||
if (CLANG_FORMAT_EXE)
|
||||
message (STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
|
||||
# Start with the list of files to include when formatting...
|
||||
file (GLOB_RECURSE FILES_TO_FORMAT ${CLANG_FORMAT_INCLUDES})
|
||||
# ... then process any list of excludes we are given
|
||||
foreach (_pat ${CLANG_FORMAT_EXCLUDES})
|
||||
file (GLOB_RECURSE _excl ${_pat})
|
||||
list (REMOVE_ITEM FILES_TO_FORMAT ${_excl})
|
||||
endforeach ()
|
||||
# message (STATUS "clang-format file list: ${FILES_TO_FORMAT}")
|
||||
file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_custom_target (clang-format
|
||||
COMMAND "${CLANG_FORMAT_EXE}" -i -style=file ${FILES_TO_FORMAT} )
|
||||
else ()
|
||||
message (STATUS "clang-format not found.")
|
||||
# Note: skip all of this checking, setup, and cmake-format target if this
|
||||
# is being built as a subproject.
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
|
||||
set (CLANG_FORMAT_INCLUDES "src/*.cpp" "src/*.h" "src/*.cu"
|
||||
CACHE STRING "Glob patterns to include for clang-format")
|
||||
set (CLANG_FORMAT_EXCLUDES
|
||||
# Files "imported and modified" that we don't want to reformat, so
|
||||
# they continue to match their upstream versions.
|
||||
"src/include/OSL/Imathx/*"
|
||||
"src/include/OSL/matrix22.h"
|
||||
# Header files in testsuite are almost certainly osl headers, not C++
|
||||
"testsuite/*.h"
|
||||
# Header files in shaders are OSL, not C++
|
||||
"src/shaders/*.h"
|
||||
CACHE STRING "Glob patterns to exclude for clang-format")
|
||||
find_program (CLANG_FORMAT_EXE
|
||||
NAMES clang-format bin/clang-format
|
||||
HINTS ${CLANG_FORMAT_EXE_HINT} ENV CLANG_FORMAT_EXE_HINT
|
||||
ENV LLVM_DIRECTORY
|
||||
NO_DEFAULT_PATH
|
||||
DOC "Path to clang-format executable")
|
||||
find_program (CLANG_FORMAT_EXE NAMES clang-format bin/clang-format)
|
||||
if (CLANG_FORMAT_EXE)
|
||||
message (STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
|
||||
# Start with the list of files to include when formatting...
|
||||
file (GLOB_RECURSE FILES_TO_FORMAT ${CLANG_FORMAT_INCLUDES})
|
||||
# ... then process any list of excludes we are given
|
||||
foreach (_pat ${CLANG_FORMAT_EXCLUDES})
|
||||
file (GLOB_RECURSE _excl ${_pat})
|
||||
list (REMOVE_ITEM FILES_TO_FORMAT ${_excl})
|
||||
endforeach ()
|
||||
# message (STATUS "clang-format file list: ${FILES_TO_FORMAT}")
|
||||
file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_custom_target (clang-format
|
||||
COMMAND "${CLANG_FORMAT_EXE}" -i -style=file ${FILES_TO_FORMAT} )
|
||||
else ()
|
||||
message (STATUS "clang-format not found.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -531,9 +557,10 @@ endif ()
|
||||
|
||||
###########################################################################
|
||||
# Any extra logic to be run only for CI builds goes here.
|
||||
# We expect our own CI runs to define env variable ${PROJECT_NAME}_CI
|
||||
#
|
||||
if (DEFINED ENV{TRAVIS} OR DEFINED ENV{APPVEYOR} OR DEFINED ENV{CI} OR DEFINED ENV{GITHUB_ACTIONS})
|
||||
add_definitions ("-D${PROJ_NAME}_CI=1" "-DBUILD_CI=1")
|
||||
if (DEFINED ENV{${PROJECT_NAME}_CI})
|
||||
add_definitions (-D${PROJ_NAME}_CI=1 -DBUILD_CI=1)
|
||||
if (APPLE)
|
||||
# Keep Mono framework from being incorrectly searched for include
|
||||
# files on GitHub Actions CI.
|
||||
|
||||
+56
-12
@@ -1,15 +1,25 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
set ($OSL_EXTRA_NVCC_ARGS "" CACHE STRING "Custom args passed to nvcc when compiling CUDA code")
|
||||
|
||||
# Compile a CUDA file to PTX using NVCC
|
||||
function ( NVCC_COMPILE cuda_src ptx_generated extra_nvcc_args )
|
||||
function ( NVCC_COMPILE cuda_src extra_headers ptx_generated extra_nvcc_args )
|
||||
get_filename_component ( cuda_src_we ${cuda_src} NAME_WE )
|
||||
get_filename_component ( cuda_src_dir ${cuda_src} DIRECTORY )
|
||||
set (cuda_ptx "${CMAKE_CURRENT_BINARY_DIR}/${cuda_src_we}.ptx" )
|
||||
set (${ptxlist} ${${ptxlist}} ${cuda_ptx} )
|
||||
set (${ptx_generated} ${cuda_ptx} PARENT_SCOPE)
|
||||
file ( GLOB cuda_headers "${cuda_src_dir}/*.h" )
|
||||
list (APPEND cuda_headers ${extra_headers})
|
||||
|
||||
list (TRANSFORM IMATH_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_IMATH_INCLUDES)
|
||||
list (TRANSFORM OPENEXR_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_OPENEXR_INCLUDES)
|
||||
list (TRANSFORM OpenImageIO_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_OpenImageIO_INCLUDES)
|
||||
|
||||
add_custom_command ( OUTPUT ${cuda_ptx}
|
||||
COMMAND ${CUDA_NVCC_EXECUTABLE}
|
||||
@@ -19,15 +29,17 @@ function ( NVCC_COMPILE cuda_src ptx_generated extra_nvcc_args )
|
||||
"-I${CMAKE_BINARY_DIR}/include"
|
||||
"-I${PROJECT_SOURCE_DIR}/src/include"
|
||||
"-I${PROJECT_SOURCE_DIR}/src/cuda_common"
|
||||
"-I${OPENIMAGEIO_INCLUDES}"
|
||||
"-I${ILMBASE_INCLUDES}"
|
||||
${ALL_OpenImageIO_INCLUDES}
|
||||
${ALL_IMATH_INCLUDES}
|
||||
${ALL_OPENEXR_INCLUDES}
|
||||
"-I${Boost_INCLUDE_DIRS}"
|
||||
"-DFMT_DEPRECATED=\"\""
|
||||
${LLVM_COMPILE_FLAGS}
|
||||
-DOSL_USE_FAST_MATH=1
|
||||
-m64 -arch ${CUDA_TARGET_ARCH} -ptx
|
||||
--std=c++11 -dc -O3 --use_fast_math --expt-relaxed-constexpr
|
||||
--std=c++14 -dc -O3 --use_fast_math --expt-relaxed-constexpr
|
||||
${extra_nvcc_args}
|
||||
${OSL_EXTRA_NVCC_ARGS}
|
||||
${cuda_src} -o ${cuda_ptx}
|
||||
MAIN_DEPENDENCY ${cuda_src}
|
||||
DEPENDS ${cuda_src} ${cuda_headers} oslexec
|
||||
@@ -68,6 +80,37 @@ function ( MAKE_CUDA_BITCODE src suffix generated_bc extra_clang_args )
|
||||
message (STATUS "Using LLVM_BC_GENERATOR ${LLVM_BC_GENERATOR} to generate bitcode.")
|
||||
endif()
|
||||
|
||||
if (NOT LLVM_AS_TOOL)
|
||||
find_program (LLVM_AS_TOOL NAMES "llvm-as"
|
||||
PATHS "${LLVM_DIRECTORY}/bin" "${LLVM_DIRECTORY}/tools/llvm"
|
||||
NO_CMAKE_PATH NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
|
||||
endif ()
|
||||
|
||||
if (NOT LLVM_LINK_TOOL)
|
||||
find_program (LLVM_LINK_TOOL NAMES "llvm-link"
|
||||
PATHS "${LLVM_DIRECTORY}/bin" "${LLVM_DIRECTORY}/tools/llvm"
|
||||
NO_CMAKE_PATH NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
# fix compilation error when using MSVC
|
||||
set (CLANG_MSVC_FIX "-DBOOST_CONFIG_REQUIRES_THREADS_HPP")
|
||||
|
||||
# these are warnings triggered by the dllimport/export attributes not being supported when
|
||||
# compiling for Cuda. When all 3rd parties have their export macro fixed these warnings
|
||||
# can be restored.
|
||||
set (CLANG_MSVC_FIX "${CLANG_MSVC_FIX} -Wno-ignored-attributes -Wno-unknown-attributes")
|
||||
endif ()
|
||||
|
||||
list (TRANSFORM IMATH_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_IMATH_INCLUDES)
|
||||
list (TRANSFORM OPENEXR_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_OPENEXR_INCLUDES)
|
||||
list (TRANSFORM OpenImageIO_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_OpenImageIO_INCLUDES)
|
||||
|
||||
add_custom_command (OUTPUT ${bc_cuda}
|
||||
COMMAND ${LLVM_BC_GENERATOR}
|
||||
"-I${OPTIX_INCLUDES}"
|
||||
@@ -76,16 +119,17 @@ function ( MAKE_CUDA_BITCODE src suffix generated_bc extra_clang_args )
|
||||
"-I${CMAKE_BINARY_DIR}/include"
|
||||
"-I${PROJECT_SOURCE_DIR}/src/include"
|
||||
"-I${PROJECT_SOURCE_DIR}/src/cuda_common"
|
||||
"-I${OPENIMAGEIO_INCLUDE_DIR}"
|
||||
"-I${ILMBASE_INCLUDE_DIR}"
|
||||
${ALL_OpenImageIO_INCLUDES}
|
||||
${ALL_IMATH_INCLUDES}
|
||||
${ALL_OPENEXR_INCLUDES}
|
||||
"-I${Boost_INCLUDE_DIRS}"
|
||||
${LLVM_COMPILE_FLAGS} ${CUDA_LIB_FLAGS}
|
||||
-D__CUDACC__ -DOSL_COMPILING_TO_BITCODE=1 -DNDEBUG -DOIIO_NO_SSE
|
||||
${LLVM_COMPILE_FLAGS} ${CUDA_LIB_FLAGS} ${CLANG_MSVC_FIX}
|
||||
-D__CUDACC__ -DOSL_COMPILING_TO_BITCODE=1 -DNDEBUG -DOIIO_NO_SSE -D__CUDADEVRT_INTERNAL__
|
||||
--language=cuda --cuda-device-only --cuda-gpu-arch=${CUDA_TARGET_ARCH}
|
||||
-Wno-deprecated-register -Wno-format-security
|
||||
-O3 -fno-math-errno -ffast-math -S -emit-llvm ${extra_clang_args}
|
||||
${src} -o ${asm_cuda}
|
||||
COMMAND "${LLVM_DIRECTORY}/bin/llvm-as" -f -o ${bc_cuda} ${asm_cuda}
|
||||
COMMAND ${LLVM_AS_TOOL} -f -o ${bc_cuda} ${asm_cuda}
|
||||
DEPENDS ${exec_headers} ${PROJECT_PUBLIC_HEADERS} ${src}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
|
||||
endfunction ()
|
||||
@@ -100,8 +144,8 @@ function ( LLVM_COMPILE_CUDA llvm_src headers prefix llvm_bc_cpp_generated extra
|
||||
MAKE_CUDA_BITCODE (${llvm_src} "" llvm_bc "${extra_clang_args}")
|
||||
|
||||
add_custom_command (OUTPUT ${llvm_bc_cpp}
|
||||
COMMAND python "${CMAKE_SOURCE_DIR}/src/liboslexec/serialize-bc.py" ${llvm_bc} ${llvm_bc_cpp} ${prefix}
|
||||
COMMAND ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py" ${llvm_bc} ${llvm_bc_cpp} ${prefix}
|
||||
MAIN_DEPENDENCY ${llvm_src}
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/src/liboslexec/serialize-bc.py" ${llvm_src} ${headers} ${llvm_bc}
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py" ${llvm_src} ${headers} ${llvm_bc}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
|
||||
endfunction ()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
###########################################################################
|
||||
# Find external dependencies
|
||||
@@ -8,23 +8,8 @@
|
||||
|
||||
# When not in VERBOSE mode, try to make things as quiet as possible
|
||||
if (NOT VERBOSE)
|
||||
set (Bison_FIND_QUIETLY true)
|
||||
set (Boost_FIND_QUIETLY true)
|
||||
set (Curses_FIND_QUIETLY true)
|
||||
set (Flex_FIND_QUIETLY true)
|
||||
# set (LLVM_FIND_QUIETLY true)
|
||||
set (OpenEXR_FIND_QUIETLY true)
|
||||
# set (OpenImageIO_FIND_QUIETLY true)
|
||||
# set (Partio_FIND_QUIETLY true)
|
||||
set (PkgConfig_FIND_QUIETLY true)
|
||||
set (PugiXML_FIND_QUIETLY TRUE)
|
||||
set (PythonInterp_FIND_QUIETLY true)
|
||||
set (PythonLibs_FIND_QUIETLY true)
|
||||
set (Qt5_FIND_QUIETLY true)
|
||||
set (Threads_FIND_QUIETLY true)
|
||||
set (ZLIB_FIND_QUIETLY true)
|
||||
set (CUDA_FIND_QUIETLY true)
|
||||
set (OptiX_FIND_QUIETLY true)
|
||||
endif ()
|
||||
|
||||
message (STATUS "${ColorBoldWhite}")
|
||||
@@ -43,117 +28,6 @@ set (OSL_LOCAL_DEPS_DIR "${CMAKE_SOURCE_DIR}/ext/dist" CACHE STRING
|
||||
list (INSERT CMAKE_PREFIX_PATH 0 ${OSL_LOCAL_DEPS_DIR})
|
||||
message (STATUS "CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
|
||||
|
||||
set (REQUIED_DEPS "" CACHE STRING
|
||||
"Additional dependencies to consider required (semicolon-separated list, or ALL)")
|
||||
set (OPTIONAL_DEPS "" CACHE STRING
|
||||
"Additional dependencies to consider optional (semicolon-separated list, or ALL)")
|
||||
|
||||
|
||||
# checked_find_package(pkgname ..) is a wrapper for find_package, with the
|
||||
# following extra features:
|
||||
# * If either `USE_pkgname` or the all-uppercase `USE_PKGNAME` (or
|
||||
# `ENABLE_pkgname` or `ENABLE_PKGNAME`) exists as either a CMake or
|
||||
# environment variable, is nonempty by contains a non-true/nonnzero
|
||||
# value, do not search for or use the package. The optional ENABLE <var>
|
||||
# arguments allow you to override the name of the enabling variable. In
|
||||
# other words, support for the dependency is presumed to be ON, unless
|
||||
# turned off explicitly from one of these sources.
|
||||
# * Print a message if the package is enabled but not found. This is based
|
||||
# on ${pkgname}_FOUND or $PKGNNAME_FOUND.
|
||||
# * Optional DEFINITIONS <string> are passed to add_definitions if the
|
||||
# package is found.
|
||||
# * Optional PRINT <list> is a list of variables that will be printed
|
||||
# if the package is found, if VERBOSE is on.
|
||||
# * Optional DEPS <list> is a list of hard dependencies; for each one, if
|
||||
# dep_FOUND is not true, disable this package with an error message.
|
||||
# * Optional ISDEPOF <downstream> names another package for which the
|
||||
# present package is only needed because it's a dependency, and
|
||||
# therefore if <downstream> is disabled, we don't bother with this
|
||||
# package either.
|
||||
#
|
||||
# N.B. This needs to be a macro, not a function, because the find modules
|
||||
# will set(blah val PARENT_SCOPE) and we need that to be the global scope,
|
||||
# not merely the scope for this function.
|
||||
macro (checked_find_package pkgname)
|
||||
cmake_parse_arguments(_pkg "REQUIRED" "ENABLE;ISDEPOF" "DEFINITIONS;PRINT;DEPS" ${ARGN})
|
||||
# Arguments: <prefix> noValueKeywords singleValueKeywords multiValueKeywords argsToParse
|
||||
string (TOUPPER ${pkgname} pkgname_upper)
|
||||
if (NOT VERBOSE)
|
||||
set (${pkgname}_FIND_QUIETLY true)
|
||||
set (${pkgname_upper}_FIND_QUIETLY true)
|
||||
endif ()
|
||||
if ("${pkgname}" IN_LIST REQUIRED_DEPS OR "ALL" IN_LIST REQUIRED_DEPS)
|
||||
set (_pkg_REQUIRED 1)
|
||||
endif ()
|
||||
if ("${pkgname}" IN_LIST OPTIONAL_DEPS OR "ALL" IN_LIST OPTIONAL_DEPS)
|
||||
set (_pkg_REQUIRED 0)
|
||||
endif ()
|
||||
set (_quietskip false)
|
||||
check_is_enabled (${pkgname} _enable)
|
||||
set (_disablereason "")
|
||||
foreach (_dep ${_pkg_DEPS})
|
||||
if (_enable AND NOT ${_dep}_FOUND)
|
||||
set (_enable false)
|
||||
set (ENABLE_${pkgname} OFF PARENT_SCOPE)
|
||||
set (_disablereason "(because ${_dep} was not found)")
|
||||
endif ()
|
||||
endforeach ()
|
||||
if (_pkg_ISDEPOF)
|
||||
check_is_enabled (${_pkg_ISDEPOF} _dep_enabled)
|
||||
if (NOT _dep_enabled)
|
||||
set (_enable false)
|
||||
set (_quietskip true)
|
||||
endif ()
|
||||
endif ()
|
||||
if (_enable OR _pkg_REQUIRED)
|
||||
find_package (${pkgname} ${_pkg_UNPARSED_ARGUMENTS})
|
||||
if (${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
|
||||
foreach (_vervar ${pkgname_upper}_VERSION ${pkgname}_VERSION_STRING
|
||||
${pkgname_upper}_VERSION_STRING)
|
||||
if (NOT ${pkgname}_VERSION AND ${_vervar})
|
||||
set (${pkgname}_VERSION ${${_vervar}})
|
||||
endif ()
|
||||
endforeach ()
|
||||
message (STATUS "${ColorGreen}Found ${pkgname} ${${pkgname}_VERSION} ${ColorReset}")
|
||||
if (VERBOSE)
|
||||
set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
|
||||
${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR
|
||||
${pkgname}_INCLUDE_DIRS ${pkgname_upper}_INCLUDE_DIRS
|
||||
${pkgname}_LIBRARIES ${pkgname_upper}_LIBRARIES
|
||||
${_pkg_PRINT})
|
||||
list (REMOVE_DUPLICATES _vars_to_print)
|
||||
foreach (_v IN LISTS _vars_to_print)
|
||||
if (NOT "${${_v}}" STREQUAL "")
|
||||
message (STATUS " ${_v} = ${${_v}}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
add_definitions (${_pkg_DEFINITIONS})
|
||||
else ()
|
||||
message (STATUS "${ColorRed}${pkgname} library not found ${ColorReset}")
|
||||
if (${pkgname}_ROOT)
|
||||
message (STATUS "${ColorRed} ${pkgname}_ROOT was: ${${pkgname}_ROOT} ${ColorReset}")
|
||||
elseif ($ENV{${pkgname}_ROOT})
|
||||
message (STATUS "${ColorRed} ENV ${pkgname}_ROOT was: ${${pkgname}_ROOT} ${ColorReset}")
|
||||
else ()
|
||||
message (STATUS "${ColorRed} Try setting ${pkgname}_ROOT ? ${ColorReset}")
|
||||
endif ()
|
||||
if (EXISTS "${PROJECT_SOURCE_DIR}/src/build-scripts/build_${pkgname}.bash")
|
||||
message (STATUS "${ColorRed} Maybe this will help: src/build-scripts/build_${pkgname}.bash ${ColorReset}")
|
||||
endif ()
|
||||
if (_pkg_REQUIRED)
|
||||
message (FATAL_ERROR "${ColorRed}${pkgname} is required, aborting.${ColorReset}")
|
||||
endif ()
|
||||
endif()
|
||||
else ()
|
||||
if (NOT _quietskip)
|
||||
message (STATUS "${ColorRed}Not using ${pkgname} -- disabled ${_disablereason} ${ColorReset}")
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
|
||||
|
||||
|
||||
include (ExternalProject)
|
||||
|
||||
@@ -175,16 +49,16 @@ if (BOOST_CUSTOM)
|
||||
# Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES.
|
||||
else ()
|
||||
set (Boost_COMPONENTS filesystem system thread)
|
||||
if (NOT USE_STD_REGEX)
|
||||
list (APPEND Boost_COMPONENTS regex)
|
||||
endif ()
|
||||
# The FindBoost.cmake interface is broken if it uses boost's installed
|
||||
# cmake output (e.g. boost 1.70.0, cmake <= 3.14). Specifically it fails
|
||||
# to set the expected variables printed below. So until that's fixed
|
||||
# force FindBoost.cmake to use the original brute force path.
|
||||
set (Boost_NO_BOOST_CMAKE ON)
|
||||
checked_find_package (Boost 1.55 REQUIRED
|
||||
checked_find_package (Boost REQUIRED
|
||||
VERSION_MIN 1.55
|
||||
COMPONENTS ${Boost_COMPONENTS}
|
||||
RECOMMEND_MIN 1.66
|
||||
RECOMMEND_MIN_REASON "Boost 1.66 is the oldest version our CI tests against"
|
||||
PRINT Boost_INCLUDE_DIRS Boost_LIBRARIES
|
||||
)
|
||||
endif ()
|
||||
@@ -205,34 +79,42 @@ link_directories ("${Boost_LIBRARY_DIRS}")
|
||||
checked_find_package (ZLIB REQUIRED) # Needed by several packages
|
||||
|
||||
# IlmBase & OpenEXR
|
||||
checked_find_package (OpenEXR 2.0 REQUIRED)
|
||||
# We use Imath so commonly, may as well include it everywhere.
|
||||
include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}"
|
||||
"${ILMBASE_INCLUDES}/OpenEXR")
|
||||
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3)
|
||||
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers
|
||||
add_compile_options (-Wno-deprecated-register)
|
||||
endif ()
|
||||
checked_find_package (OpenEXR REQUIRED
|
||||
VERSION_MIN 2.3
|
||||
RECOMMEND_MIN 2.4
|
||||
RECOMMEND_MIN_REASON
|
||||
"Even extremely critical patches are no longer supplied to < 2.4"
|
||||
PRINT IMATH_INCLUDES
|
||||
)
|
||||
# Force Imath includes to be before everything else to ensure that we have
|
||||
# the right Imath/OpenEXR version, not some older version in the system
|
||||
# library. This shouldn't be necessary, except for the common case of people
|
||||
# building against Imath/OpenEXR 3.x when there is still a system-level
|
||||
# install version of 2.x.
|
||||
include_directories(BEFORE ${IMATH_INCLUDES})
|
||||
if (MSVC AND NOT LINKSTATIC)
|
||||
add_definitions (-DOPENEXR_DLL) # Is this needed for new versions?
|
||||
endif ()
|
||||
|
||||
|
||||
# OpenImageIO
|
||||
set (OIIO_LIBNAME_SUFFIX "" CACHE STRING
|
||||
"Optional name appended to OIIO libraries that are built")
|
||||
checked_find_package (OpenImageIO 2.0 REQUIRED
|
||||
PRINT OIIOTOOL_BIN)
|
||||
if (OPENIMAGEIO_FOUND)
|
||||
include_directories ("${OPENIMAGEIO_INCLUDES}")
|
||||
if (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.5.99)
|
||||
set (OSL_USING_IMATH 3)
|
||||
else ()
|
||||
set (OSL_USING_IMATH 2)
|
||||
endif ()
|
||||
|
||||
|
||||
checked_find_package (pugixml REQUIRED)
|
||||
# OpenImageIO
|
||||
checked_find_package (OpenImageIO REQUIRED
|
||||
VERSION_MIN 2.3.17
|
||||
DEFINITIONS -DOIIO_HIDE_FORMAT=1)
|
||||
|
||||
checked_find_package (pugixml REQUIRED
|
||||
VERSION_MIN 1.8)
|
||||
|
||||
|
||||
# LLVM library setup
|
||||
checked_find_package (LLVM 7.0 REQUIRED
|
||||
checked_find_package (LLVM REQUIRED
|
||||
VERSION_MIN 9.0
|
||||
PRINT LLVM_SYSTEM_LIBRARIES CLANG_LIBRARIES)
|
||||
# ensure include directory is added (in case of non-standard locations
|
||||
include_directories (BEFORE SYSTEM "${LLVM_INCLUDES}")
|
||||
@@ -245,20 +127,31 @@ add_definitions (-DOSL_LLVM_FULL_VERSION="${LLVM_VERSION}")
|
||||
if (LLVM_NAMESPACE)
|
||||
add_definitions ("-DLLVM_NAMESPACE=${LLVM_NAMESPACE}")
|
||||
endif ()
|
||||
if (LLVM_VERSION VERSION_GREATER_EQUAL 10.0.0 AND
|
||||
CMAKE_CXX_STANDARD VERSION_LESS 14)
|
||||
message (FATAL_ERROR
|
||||
"LLVM 10+ requires C++14 or higher (was ${CMAKE_CXX_STANDARD}). "
|
||||
"To build against this LLVM ${LLVM_VERSION}, you need to set "
|
||||
"build option CMAKE_CXX_STANDARD=14. The minimum requirements "
|
||||
"for that are gcc >= 5.1, clang >= 3.5, Apple clang >= 7, "
|
||||
"icc >= 7, MSVS >= 2017. "
|
||||
"If you must use C++11, you need to build against LLVM 9 or earlier.")
|
||||
if (APPLE AND LLVM_VERSION VERSION_EQUAL 10.0.1 AND EXISTS "/usr/local/Cellar/llvm")
|
||||
message (WARNING
|
||||
"${ColorYellow}If you are using LLVM 10.0.1 installed by Homebrew, "
|
||||
"please note that a known bug in LLVM may produce a link error where "
|
||||
"it says it can't find libxml2.tbd. If you encounter this, please "
|
||||
"try upgrading to a newer LLVM: \n"
|
||||
" brew upgrade llvm \n"
|
||||
"${ColorReset}\n")
|
||||
endif ()
|
||||
if (LLVM_VERSION VERSION_GREATER_EQUAL 15.0
|
||||
AND ( (CMAKE_COMPILER_IS_APPLECLANG AND APPLECLANG_VERSION_STRING VERSION_LESS 15.0)
|
||||
OR (CMAKE_COMPILER_IS_CLANG AND CLANG_VERSION_STRING VERSION_LESS 15.0)))
|
||||
message (WARNING
|
||||
"${ColorYellow}"
|
||||
"If you are using LLVM 15 or higher, you should also use clang version "
|
||||
"15 or higher, or you may get build errors.${ColorReset}\n")
|
||||
endif ()
|
||||
|
||||
checked_find_package (partio)
|
||||
|
||||
|
||||
# From pythonutils.cmake
|
||||
find_python ()
|
||||
|
||||
|
||||
# Qt -- used for osltoy
|
||||
set (qt5_modules Core Gui Widgets)
|
||||
if (OPENGL_FOUND)
|
||||
@@ -282,29 +175,52 @@ if (USE_CUDA OR USE_OPTIX)
|
||||
message (STATUS "CUDA_TOOLKIT_ROOT_DIR = ${CUDA_TOOLKIT_ROOT_DIR}")
|
||||
endif ()
|
||||
|
||||
checked_find_package (CUDA 8.0 REQUIRED
|
||||
checked_find_package (CUDA REQUIRED
|
||||
VERSION_MIN 8.0
|
||||
PRINT CUDA_INCLUDES)
|
||||
set (CUDA_INCLUDES ${CUDA_TOOLKIT_ROOT_DIR}/include)
|
||||
include_directories (BEFORE "${CUDA_INCLUDES}")
|
||||
|
||||
STRING (FIND ${LLVM_TARGETS} "NVPTX" nvptx_index)
|
||||
if (NOT ${nvptx_index} GREATER -1)
|
||||
message (FATAL_ERROR "NVTPX target is not available in the provided LLVM build")
|
||||
message (FATAL_ERROR "NVPTX target is not available in the provided LLVM build")
|
||||
endif()
|
||||
|
||||
if (${CUDA_VERSION} VERSION_GREATER 8 AND ${LLVM_VERSION} VERSION_LESS 6)
|
||||
message (FATAL_ERROR "CUDA ${CUDA_VERSION} requires LLVM 6.0 or greater")
|
||||
endif ()
|
||||
|
||||
set (CUDA_LIB_FLAGS "--cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")
|
||||
endif ()
|
||||
|
||||
find_library(cuda_lib NAMES cudart
|
||||
PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib64" "${CUDA_TOOLKIT_ROOT_DIR}/x64"
|
||||
REQUIRED)
|
||||
set(CUDA_LIBRARIES ${cuda_lib})
|
||||
|
||||
# OptiX setup
|
||||
if (USE_OPTIX)
|
||||
checked_find_package (OptiX 5.1 REQUIRED)
|
||||
include_directories (BEFORE "${OPTIX_INCLUDES}")
|
||||
if (NOT USE_LLVM_BITCODE OR NOT USE_FAST_MATH)
|
||||
message (FATAL_ERROR "Enabling OptiX requires USE_LLVM_BITCODE=1 and USE_FAST_MATH=1")
|
||||
# testrender & testshade need libnvrtc
|
||||
if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "10.0")
|
||||
find_library(nvrtc_lib NAMES nvrtc
|
||||
PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib64" "${CUDA_TOOLKIT_ROOT_DIR}/x64"
|
||||
REQUIRED)
|
||||
set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${nvrtc_lib})
|
||||
|
||||
set(CUDA_EXTRA_LIBS ${CUDA_EXTRA_LIBS} dl)
|
||||
endif()
|
||||
|
||||
# OptiX setup
|
||||
if (USE_OPTIX)
|
||||
checked_find_package (OptiX REQUIRED
|
||||
VERSION_MIN 7.0)
|
||||
include_directories (BEFORE "${OPTIX_INCLUDES}")
|
||||
if (NOT USE_LLVM_BITCODE OR NOT USE_FAST_MATH)
|
||||
message (FATAL_ERROR "Enabling OptiX requires USE_LLVM_BITCODE=1 and USE_FAST_MATH=1")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
function (osl_optix_target TARGET)
|
||||
target_include_directories (${TARGET} BEFORE PRIVATE ${CUDA_INCLUDES} ${OPTIX_INCLUDES})
|
||||
## XXX: Should -DPTX_PATH point to (or include) CMAKE_CURRENT_BINARY_DIR so tests can run before installation ?
|
||||
target_compile_definitions (${TARGET} PRIVATE "-DPTX_PATH=\"${OSL_PTX_INSTALL_DIR}\"")
|
||||
target_link_libraries (${TARGET} PRIVATE ${CUDA_LIBRARIES} ${CUDA_EXTRA_LIBS} ${OPTIX_LIBRARIES} ${OPTIX_EXTRA_LIBS})
|
||||
endfunction()
|
||||
|
||||
else ()
|
||||
function (osl_optix_target TARGET)
|
||||
endfunction()
|
||||
endif ()
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Macro to add an executable build target. The executable name can be
|
||||
# specified with NAME, otherwise is inferred from the subdirectory name. The
|
||||
# source files of the binary can be specifeied with SRC, otherwise are
|
||||
# source files of the binary can be specified with SRC, otherwise are
|
||||
# inferred to be all the .cpp files within the subdirectory. Optional
|
||||
# compile DEFINITIONS, private INCLUDE_DIRS, and priviate LINK_LIBRARIES may
|
||||
# compile DEFINITIONS, private INCLUDE_DIRS, and private LINK_LIBRARIES may
|
||||
# also be specified.
|
||||
#
|
||||
# The executable may be disabled individually using any of the usual
|
||||
# check_is_enabled() conventions (e.g. -DENABLE_<executable>=OFF).
|
||||
#
|
||||
# If -DENABLE_INSTALL_<executable>=OFF was specified, the target will be built
|
||||
# (in the build area) but will not be installed.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# fancy_add_executable ([ NAME targetname ... ]
|
||||
@@ -42,13 +45,16 @@ macro (fancy_add_executable)
|
||||
target_include_directories (${_target_NAME} SYSTEM PRIVATE ${_target_SYSTEM_INCLUDE_DIRS})
|
||||
endif ()
|
||||
if (_target_DEFINITIONS)
|
||||
target_compile_definitions (${_target_name} PRIVATE ${_target_DEFINITIONS})
|
||||
target_compile_definitions (${_target_NAME} PRIVATE ${_target_DEFINITIONS})
|
||||
endif ()
|
||||
if (_target_LINK_LIBRARIES)
|
||||
target_link_libraries (${_target_NAME} PRIVATE ${_target_LINK_LIBRARIES})
|
||||
endif ()
|
||||
set_target_properties (${_target_NAME} PROPERTIES FOLDER "Tools")
|
||||
install_targets (${_target_NAME})
|
||||
check_is_enabled (INSTALL_${_target_NAME} _target_NAME_INSTALL_enabled)
|
||||
if (_target_NAME_INSTALL_enabled)
|
||||
install_targets (${_target_NAME})
|
||||
endif ()
|
||||
else ()
|
||||
message (STATUS "${ColorRed}Disabling ${_target_NAME} ${ColorReset}")
|
||||
endif ()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# LG's macros for using flex and bison.
|
||||
# Merely including this file will require flex and bison to be found.
|
||||
@@ -17,11 +17,27 @@
|
||||
# for the .y and .l files.
|
||||
|
||||
|
||||
checked_find_package (BISON REQUIRED)
|
||||
checked_find_package (FLEX REQUIRED)
|
||||
# On Mac, prefer the Homebrew version of Bison over the older version from
|
||||
# MacOS/xcode in /usr/bin, which seems to be too old for the reentrant
|
||||
# parser directives we use. Only do this if there is no BISON_ROOT
|
||||
# specifying a particular Bison to use.
|
||||
if (APPLE AND EXISTS /usr/local/opt
|
||||
AND NOT BISON_ROOT AND NOT DEFINED ENV{BISON_ROOT})
|
||||
find_program(BISON_EXECUTABLE NAMES /usr/local/opt/bison/bin/bison
|
||||
DOC "path to the bison executable")
|
||||
endif()
|
||||
|
||||
checked_find_package (BISON 2.7 REQUIRED
|
||||
PRINT BISON_EXECUTABLE)
|
||||
checked_find_package (FLEX 2.3.35 REQUIRED
|
||||
PRINT FLEX_EXECUTABLE)
|
||||
|
||||
if ( FLEX_EXECUTABLE AND BISON_EXECUTABLE )
|
||||
macro ( FLEX_BISON flexsrc bisonsrc prefix srclist compiler_headers )
|
||||
# mangle osoparse & oslparse symbols to avoid multiple library conflicts
|
||||
# XXX: This may be excessive now that OSL::pvt::ExtraArg is mangled into the function signature
|
||||
add_definitions(-D${prefix}parse=${PROJ_NAMESPACE_V}_${prefix}parse)
|
||||
|
||||
if (VERBOSE)
|
||||
message (STATUS "FLEX_BISON flex=${flexsrc} bison=${bisonsrc} prefix=${prefix}")
|
||||
endif ()
|
||||
@@ -56,7 +72,7 @@ if ( FLEX_EXECUTABLE AND BISON_EXECUTABLE )
|
||||
set ( FB_WINCOMPAT )
|
||||
endif ()
|
||||
add_custom_command ( OUTPUT ${flexoutputcxx}
|
||||
COMMAND ${FLEX_EXECUTABLE} ${FB_WINCOMPAT} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
|
||||
COMMAND ${FLEX_EXECUTABLE} ${FB_WINCOMPAT} --prefix=${prefix} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
|
||||
MAIN_DEPENDENCY ${flexsrc}
|
||||
DEPENDS ${${compiler_headers}}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
function ( EMBED_LLVM_BITCODE_IN_CPP src_list suffix output_name list_to_append_cpp extra_clang_args)
|
||||
|
||||
if (VERBOSE)
|
||||
message (STATUS "EMBED_LLVM_BITCODE_IN_CPP src_list=${src_list}")
|
||||
endif ()
|
||||
|
||||
foreach ( src ${src_list} )
|
||||
get_filename_component ( src_we ${src} NAME_WE )
|
||||
set ( src_asm "${CMAKE_CURRENT_BINARY_DIR}/${src_we}${suffix}.s" )
|
||||
set ( src_bc "${CMAKE_CURRENT_BINARY_DIR}/${src_we}${suffix}.bc" )
|
||||
if (VERBOSE)
|
||||
message (STATUS "EMBED_LLVM_BITCODE_IN_CPP in=${src}")
|
||||
message (STATUS "EMBED_LLVM_BITCODE_IN_CPP asm=${src_asm}")
|
||||
message (STATUS "EMBED_LLVM_BITCODE_IN_CPP bc=${src_bc}")
|
||||
endif ()
|
||||
list ( APPEND src_bc_list ${src_bc} )
|
||||
|
||||
get_property (CURRENT_DEFINITIONS DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
if (VERBOSE)
|
||||
message (STATUS "Current #defines are ${CURRENT_DEFINITIONS}")
|
||||
endif ()
|
||||
foreach (def ${CURRENT_DEFINITIONS})
|
||||
set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} "-D${def}")
|
||||
endforeach()
|
||||
set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} ${SIMD_COMPILE_FLAGS} ${CSTD_FLAGS} ${TOOLCHAIN_FLAGS})
|
||||
# Avoid generating __dso_handle external global
|
||||
set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} "-fno-use-cxa-atexit")
|
||||
|
||||
# Figure out what program we will use to make the bitcode.
|
||||
if (NOT LLVM_BC_GENERATOR)
|
||||
find_program (LLVM_BC_GENERATOR NAMES "clang++"
|
||||
PATHS "${LLVM_DIRECTORY}/bin" "${LLVM_DIRECTORY}/tools/llvm"
|
||||
NO_CMAKE_PATH NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
|
||||
endif ()
|
||||
|
||||
if (NOT LLVM_BC_GENERATOR)
|
||||
message (FATAL_ERROR "You must have a valid llvm bitcode generator (clang++) somewhere.")
|
||||
endif ()
|
||||
if (VERBOSE)
|
||||
message (STATUS "Using LLVM_BC_GENERATOR ${LLVM_BC_GENERATOR} to generate bitcode.")
|
||||
endif()
|
||||
|
||||
if (NOT LLVM_AS_TOOL)
|
||||
find_program (LLVM_AS_TOOL NAMES "llvm-as"
|
||||
PATHS "${LLVM_DIRECTORY}/bin" "${LLVM_DIRECTORY}/tools/llvm"
|
||||
NO_CMAKE_PATH NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
|
||||
endif ()
|
||||
|
||||
if (NOT LLVM_LINK_TOOL)
|
||||
find_program (LLVM_LINK_TOOL NAMES "llvm-link"
|
||||
PATHS "${LLVM_DIRECTORY}/bin" "${LLVM_DIRECTORY}/tools/llvm"
|
||||
NO_CMAKE_PATH NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
|
||||
endif ()
|
||||
|
||||
|
||||
# Fix specific problem I had on new Apple systems (e.g. Mavericks) with
|
||||
# LLVM/libc++ installed -- for some reason, LLVM 3.4 wasn't finding it,
|
||||
# so in that specific case, append another -I to point it in the right
|
||||
# direction.
|
||||
#if (APPLE AND ${LLVM_BC_GENERATOR} MATCHES ".*clang.*")
|
||||
# exec_program ( "${LLVM_BC_GENERATOR}" ARGS --version OUTPUT_VARIABLE MY_CLANG_VERSION )
|
||||
# string (REGEX REPLACE "clang version ([0-9][.][0-9]+).*" "\\1" MY_CLANG_VERSION "${MY_CLANG_VERSION}")
|
||||
# if ((${MY_CLANG_VERSION} VERSION_GREATER "3.3")
|
||||
# AND (EXISTS "/usr/lib/libc++.dylib")
|
||||
# AND (EXISTS "/Library/Developer/CommandLineTools/usr/lib/c++/v1"))
|
||||
# set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} "-I/Library/Developer/CommandLineTools/usr/lib/c++/v1")
|
||||
# endif ()
|
||||
#endif ()
|
||||
|
||||
list (TRANSFORM IMATH_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_IMATH_INCLUDES)
|
||||
list (TRANSFORM OPENEXR_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_OPENEXR_INCLUDES)
|
||||
list (TRANSFORM OpenImageIO_INCLUDES PREPEND -I
|
||||
OUTPUT_VARIABLE ALL_OpenImageIO_INCLUDES)
|
||||
|
||||
if (${LLVM_VERSION} VERSION_GREATER_EQUAL 15.0)
|
||||
# Until we fully support opaque pointers, we need to disable
|
||||
# them when using LLVM 15.
|
||||
list (APPEND LLVM_COMPILE_FLAGS -Xclang -no-opaque-pointers)
|
||||
endif ()
|
||||
|
||||
# Command to turn the .cpp file into LLVM assembly language .s, into
|
||||
# LLVM bitcode .bc, then back into a C++ file with the bc embedded!
|
||||
add_custom_command ( OUTPUT ${src_bc}
|
||||
COMMAND ${LLVM_BC_GENERATOR}
|
||||
${LLVM_COMPILE_FLAGS}
|
||||
"-I${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"-I${CMAKE_SOURCE_DIR}/src/include"
|
||||
"-I${CMAKE_BINARY_DIR}/include"
|
||||
${ALL_OpenImageIO_INCLUDES}
|
||||
${ALL_IMATH_INCLUDES}
|
||||
#"-isystem ${Boost_INCLUDE_DIRS}" #Does not pick up usr installed boost/thread/tss.hpp for oslexec_pvt.h
|
||||
"-I${Boost_INCLUDE_DIRS}"
|
||||
-DOSL_COMPILING_TO_BITCODE=1
|
||||
-Wno-deprecated-register
|
||||
# the following 2 warnings can be restored when all 3rd parties have fixed their export macros
|
||||
# (dllimport attribute is not supported when compiling for Cuda and triggers a ton of warnings)
|
||||
-Wno-ignored-attributes -Wno-unknown-attributes
|
||||
-O3 -fno-math-errno -S -emit-llvm ${extra_clang_args}
|
||||
-o ${src_asm} ${src}
|
||||
COMMAND ${LLVM_AS_TOOL} -f -o ${src_bc} ${src_asm}
|
||||
# Do NOT setup a MAIN_DEPENDENCY because only 1 may exist
|
||||
# and we may have the several outputs dependent on the same source
|
||||
DEPENDS ${src} ${exec_headers} ${PROJECT_PUBLIC_HEADERS}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
|
||||
endforeach ()
|
||||
|
||||
|
||||
if (VERBOSE)
|
||||
message ( STATUS "^^^^^^^^^^^^^^^^^^^^^^^^^^" )
|
||||
message ( STATUS "src_bc_list: ${src_bc_list} ")
|
||||
message ( STATUS "^^^^^^^^^^^^^^^^^^^^^^^^^^" )
|
||||
endif()
|
||||
|
||||
# Link all of the individual LLVM bitcode files
|
||||
set ( linked_src_bc "${CMAKE_CURRENT_BINARY_DIR}/${output_name}.bc" )
|
||||
add_custom_command ( OUTPUT ${linked_src_bc}
|
||||
COMMAND ${LLVM_LINK_TOOL} -internalize ${src_bc_list} -o ${linked_src_bc}
|
||||
DEPENDS ${src_bc_list} ${exec_headers} ${PROJECT_PUBLIC_HEADERS} ${src_list}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
# Serialize the linked bitcode into a CPP file
|
||||
set ( src_bc_cpp "${CMAKE_CURRENT_BINARY_DIR}/${output_name}.bc.cpp" )
|
||||
add_custom_command ( OUTPUT ${src_bc_cpp}
|
||||
COMMAND ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py"
|
||||
${linked_src_bc} ${src_bc_cpp} ${output_name}
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py" ${linked_src_bc}
|
||||
${exec_headers} ${PROJECT_PUBLIC_HEADERS}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
|
||||
|
||||
# add generated .cpp with embedded bitcode to the list of sources
|
||||
set ( ${list_to_append_cpp} ${${list_to_append_cpp}} ${src_bc_cpp} PARENT_SCOPE )
|
||||
|
||||
endfunction ( )
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Module to find LLVM
|
||||
#
|
||||
@@ -30,9 +30,11 @@ list (APPEND LLVM_CONFIG_PATH_HINTS
|
||||
"/usr/local/opt/llvm/bin/")
|
||||
find_program (LLVM_CONFIG
|
||||
NAMES llvm-config-${LLVM_VERSION} llvm-config
|
||||
llvm-config-64-${LLVM_VERSION} llvm-config-64
|
||||
HINTS ${LLVM_CONFIG_PATH_HINTS} NO_DEFAULT_PATH)
|
||||
find_program (LLVM_CONFIG
|
||||
NAMES llvm-config-${LLVM_VERSION} llvm-config
|
||||
llvm-config-64-${LLVM_VERSION} llvm-config-64
|
||||
HINTS ${LLVM_CONFIG_PATH_HINTS})
|
||||
if (NOT LLVM_FIND_QUIETLY)
|
||||
message (STATUS "Found llvm-config '${LLVM_CONFIG}'")
|
||||
@@ -56,9 +58,35 @@ execute_process (COMMAND ${LLVM_CONFIG} --includedir
|
||||
execute_process (COMMAND ${LLVM_CONFIG} --targets-built
|
||||
OUTPUT_VARIABLE LLVM_TARGETS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process (COMMAND ${LLVM_CONFIG} --system-libs
|
||||
OUTPUT_VARIABLE LLVM_SYSTEM_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
############ HACK ##############
|
||||
# On OSX, the Homebrew (and maybe any build) of LLVM 10.0 seems to have a
|
||||
# link conflict with its dependency on the llvm libc++ and the system
|
||||
# libc++, both can end up dynamically linked and lead to very subtle and
|
||||
# frustrating behavior failures (in particular, osl's use of libclang will
|
||||
# botch include file parsing any time LD_LIBRARY_PATH doesn't have the llvm
|
||||
# libc++ first).
|
||||
#
|
||||
# It seems that this is not a problem when linking against the llvm and
|
||||
# libclang libraries statically. So on apple and when LLVM 10+ are involved,
|
||||
# just force that choice. Other than larger executables, it seems harmless,
|
||||
# and in any case a better choice than this beastly bug.
|
||||
#
|
||||
# We can periodically revisit this with new version of LLVM, maybe they will
|
||||
# fix things and we won't require this preemptive static linking.
|
||||
if (APPLE AND LLVM_VERSION VERSION_GREATER_EQUAL 10.0)
|
||||
set (LLVM_STATIC ON)
|
||||
endif ()
|
||||
|
||||
if (LLVM_STATIC)
|
||||
execute_process (COMMAND ${LLVM_CONFIG} --system-libs --link-static
|
||||
OUTPUT_VARIABLE LLVM_SYSTEM_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else ()
|
||||
execute_process (COMMAND ${LLVM_CONFIG} --system-libs
|
||||
OUTPUT_VARIABLE LLVM_SYSTEM_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif ()
|
||||
string (REPLACE " " ";" LLVM_SYSTEM_LIBRARIES "${LLVM_SYSTEM_LIBRARIES}")
|
||||
|
||||
find_library ( LLVM_LIBRARY
|
||||
@@ -103,25 +131,6 @@ foreach (COMPONENT clangFrontend clangDriver clangSerialization
|
||||
endforeach ()
|
||||
|
||||
|
||||
############ HACK ##############
|
||||
# On OSX, the Homebrew (and maybe any build) of LLVM 10.0 seems to have a
|
||||
# link conflict with its dependency on the llvm libc++ and the system
|
||||
# libc++, both can end up dynamically linked and lead to very subtle and
|
||||
# frustrating behavior failures (in particular, osl's use of libclang will
|
||||
# botch include file parsing any time LD_LIBRARY_PATH doesn't have the llvm
|
||||
# libc++ first).
|
||||
#
|
||||
# It seems that this is not a problem when linking against the llvm and
|
||||
# libclang libraries statically. So on apple and when LLVM 10+ are involved,
|
||||
# just force that choice. Other than larger execubales, it seems harmless,
|
||||
# and in any case a better choice than this beastly bug.
|
||||
#
|
||||
# We can periodically revisit this with new version of LLVM, maybe they will
|
||||
# fix things and we won't require this preemptive static linking.
|
||||
if (APPLE AND LLVM_VERSION VERSION_GREATER_EQUAL 10.0)
|
||||
set (LLVM_STATIC ON)
|
||||
endif ()
|
||||
|
||||
# shared llvm library may not be available, this is not an error if we use LLVM_STATIC.
|
||||
if ((LLVM_LIBRARY OR LLVM_LIBRARIES OR LLVM_STATIC) AND LLVM_INCLUDES AND LLVM_DIRECTORY AND LLVM_LIB_DIR)
|
||||
if (LLVM_STATIC)
|
||||
|
||||
@@ -1,19 +1,122 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Module to find OpenEXR.
|
||||
# Module to find OpenEXR and Imath.
|
||||
#
|
||||
# I'm afraid this is a mess, due to needing to support a wide range of
|
||||
# OpenEXR versions.
|
||||
#
|
||||
# For OpenEXR & Imath 3.0, this will establish the following imported
|
||||
# targets:
|
||||
#
|
||||
# Imath::Imath
|
||||
# Imath::Half
|
||||
# OpenEXR::OpenEXR
|
||||
# OpenEXR::Iex
|
||||
# OpenEXR::IlmThread
|
||||
#
|
||||
# For OpenEXR 2.4 & 2.5, it will establish the following imported targets:
|
||||
#
|
||||
# IlmBase::Imath
|
||||
# IlmBase::Half
|
||||
# IlmBase::Iex
|
||||
# IlmBase::IlmThread
|
||||
# OpenEXR::IlmImf
|
||||
#
|
||||
# For all versions -- but for OpenEXR < 2.4 the only thing this sets --
|
||||
# are the following CMake variables:
|
||||
#
|
||||
# This module will set
|
||||
# OPENEXR_FOUND true, if found
|
||||
# OPENEXR_INCLUDES directory where headers are found
|
||||
# OPENEXR_INCLUDES directory where OpenEXR headers are found
|
||||
# OPENEXR_LIBRARIES libraries for OpenEXR + IlmBase
|
||||
# ILMBASE_LIBRARIES libraries just IlmBase
|
||||
# OPENEXR_VERSION OpenEXR version (accurate for >= 2.0.0,
|
||||
# otherwise will just guess 1.6.1)
|
||||
# IMATH_INCLUDES directory where Imath headers are found
|
||||
# ILMBASE_INCLUDES directory where IlmBase headers are found
|
||||
# ILMBASE_LIBRARIES libraries just IlmBase
|
||||
#
|
||||
#
|
||||
|
||||
# First, try to fine just the right config files
|
||||
find_package(Imath CONFIG)
|
||||
if (NOT TARGET Imath::Imath)
|
||||
# Couldn't find Imath::Imath, maybe it's older and has IlmBase?
|
||||
find_package(IlmBase CONFIG)
|
||||
endif ()
|
||||
find_package(OpenEXR CONFIG)
|
||||
|
||||
if (TARGET OpenEXR::OpenEXR AND TARGET Imath::Imath)
|
||||
# OpenEXR 3.x if both of these targets are found
|
||||
set (FOUND_OPENEXR_WITH_CONFIG 1)
|
||||
if (NOT OpenEXR_FIND_QUIETLY)
|
||||
message (STATUS "Found CONFIG for OpenEXR 3 (OPENEXR_VERSION=${OpenEXR_VERSION})")
|
||||
endif ()
|
||||
|
||||
# Mimic old style variables
|
||||
set (OPENEXR_VERSION ${OpenEXR_VERSION})
|
||||
get_target_property(IMATH_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(ILMBASE_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(ILMBASE_IMATH_LIBRARY Imath::Imath INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(IMATH_LIBRARY Imath::Imath INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(OPENEXR_IEX_LIBRARY OpenEXR::Iex INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(OPENEXR_ILMTHREAD_LIBRARY OpenEXR::IlmThread INTERFACE_LINK_LIBRARIES)
|
||||
set (ILMBASE_LIBRARIES ${ILMBASE_IMATH_LIBRARY})
|
||||
set (ILMBASE_FOUND true)
|
||||
|
||||
get_target_property(OPENEXR_INCLUDES OpenEXR::OpenEXR INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(OPENEXR_ILMIMF_LIBRARY OpenEXR::OpenEXR INTERFACE_LINK_LIBRARIES)
|
||||
set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_LIBRARIES})
|
||||
set (OPENEXR_FOUND true)
|
||||
|
||||
# Link with pthreads if required
|
||||
find_package (Threads)
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
list (APPEND ILMBASE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif ()
|
||||
|
||||
elseif (TARGET OpenEXR::IlmImf AND TARGET IlmBase::Imath AND
|
||||
(OPENEXR_VERSION VERSION_GREATER_EQUAL 2.4 OR OpenEXR_VERSION VERSION_GREATER_EQUAL 2.4))
|
||||
# OpenEXR 2.4 or 2.5 with exported config
|
||||
set (FOUND_OPENEXR_WITH_CONFIG 1)
|
||||
if (NOT OpenEXR_FIND_QUIETLY)
|
||||
message (STATUS "Found CONFIG for OpenEXR 2 (OPENEXR_VERSION=${OpenEXR_VERSION})")
|
||||
endif ()
|
||||
|
||||
# Mimic old style variables
|
||||
get_target_property(ILMBASE_INCLUDES IlmBase::IlmBaseConfig INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(IMATH_INCLUDES IlmBase::IlmBaseConfig INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(ILMBASE_Imath_LIBRARY IlmBase::Imath INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(ILMBASE_IMATH_LIBRARY IlmBase::Imath INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(ILMBASE_HALF_LIBRARY IlmBase::Half INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(OPENEXR_IEX_LIBRARY IlmBase::Iex INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(OPENEXR_ILMTHREAD_LIBRARY IlmBase::IlmThread INTERFACE_LINK_LIBRARIES)
|
||||
set (ILMBASE_LIBRARIES ${ILMBASE_IMATH_LIBRARY} ${ILMBASE_HALF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY})
|
||||
set (ILMBASE_FOUND true)
|
||||
|
||||
get_target_property(OPENEXR_INCLUDES OpenEXR::IlmImfConfig INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(OPENEXR_ILMIMF_LIBRARY OpenEXR::IlmImf INTERFACE_LINK_LIBRARIES)
|
||||
set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES})
|
||||
set (OPENEXR_FOUND true)
|
||||
|
||||
# Link with pthreads if required
|
||||
find_package (Threads)
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
list (APPEND ILMBASE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif ()
|
||||
|
||||
# Correct for how old OpenEXR config exports set the directory one
|
||||
# level lower than we prefer it.
|
||||
string(REGEX REPLACE "include/OpenEXR$" "include" ILMBASE_INCLUDES "${ILMBASE_INCLUDES}")
|
||||
string(REGEX REPLACE "include/OpenEXR$" "include" IMATH_INCLUDES "${IMATH_INCLUDES}")
|
||||
string(REGEX REPLACE "include/OpenEXR$" "include" OPENEXR_INCLUDES "${OPENEXR_INCLUDES}")
|
||||
|
||||
else ()
|
||||
# OpenEXR 2.x older versions without a config or whose configs we don't
|
||||
# trust.
|
||||
|
||||
set (FOUND_OPENEXR_WITH_CONFIG 0)
|
||||
|
||||
# Other standard issue macros
|
||||
include (FindPackageHandleStandardArgs)
|
||||
include (SelectLibraryConfigurations)
|
||||
@@ -135,17 +238,20 @@ find_package_handle_standard_args (OpenEXR
|
||||
REQUIRED_VARS ILMBASE_INCLUDE_PATH OPENEXR_INCLUDE_PATH
|
||||
OPENEXR_IMATH_LIBRARY OPENEXR_ILMIMF_LIBRARY
|
||||
OPENEXR_IEX_LIBRARY OPENEXR_HALF_LIBRARY
|
||||
VERSION_VAR OPENEXR_VERSION
|
||||
)
|
||||
|
||||
if (OPENEXR_FOUND)
|
||||
set (OpenEXR_VERSION ${OPENEXR_VERSION})
|
||||
set (ILMBASE_FOUND TRUE)
|
||||
set (ILMBASE_INCLUDES ${ILMBASE_INCLUDE_PATH})
|
||||
set (IMATH_INCLUDES ${ILMBASE_INCLUDE_PATH})
|
||||
set (OPENEXR_INCLUDES ${OPENEXR_INCLUDE_PATH})
|
||||
set (ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH})
|
||||
set (IMATH_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH})
|
||||
set (OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATH})
|
||||
set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase")
|
||||
set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} ${ZLIB_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR")
|
||||
set (FINDOPENEXR_FALLBACK TRUE)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
@@ -157,3 +263,5 @@ mark_as_advanced(
|
||||
|
||||
# Restore the original CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_orig_suffixes})
|
||||
|
||||
endif ()
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
###########################################################################
|
||||
# OpenImageIO https://www.openimageio.org
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
#
|
||||
# For an up-to-date version of this file, see:
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/src/cmake/Modules/FindOpenImageIO.cmake
|
||||
#
|
||||
###########################################################################
|
||||
#
|
||||
# CMake module to find OpenImageIO
|
||||
#
|
||||
# This module will set
|
||||
# OPENIMAGEIO_FOUND True, if found
|
||||
# OPENIMAGEIO_INCLUDES directory where headers are found
|
||||
# OPENIMAGEIO_LIBRARIES libraries for OIIO
|
||||
# OPENIMAGEIO_LIBRARY_DIRS library dirs for OIIO
|
||||
# OPENIMAGEIO_VERSION Version ("major.minor.patch.tweak")
|
||||
# OPENIMAGEIO_VERSION_MAJOR Version major number
|
||||
# OPENIMAGEIO_VERSION_MINOR Version minor number
|
||||
# OPENIMAGEIO_VERSION_PATCH Version minor patch
|
||||
# OPENIMAGEIO_VERSION_TWEAK Version minor tweak
|
||||
# OIIOTOOL_BIN Path to oiiotool executable
|
||||
#
|
||||
# Imported targets:
|
||||
# OpenImageIO::OpenImageIO The libOpenImageIO library.
|
||||
# OpenImageIO::oiiotool The oiiotool executable.
|
||||
#
|
||||
# Special inputs:
|
||||
# OpenImageIO_ROOT - if using CMake >= 3.12, will automatically search
|
||||
# this area for OIIO components.
|
||||
# OPENIMAGEIO_ROOT_DIR - custom "prefix" location of OIIO installation
|
||||
# (expecting bin, lib, include subdirectories)
|
||||
# This is deprecated, but will work for a while.
|
||||
# OpenImageIO_FIND_QUIETLY - if set, print minimal console output
|
||||
# OIIO_LIBNAME_SUFFIX - if set, optional nonstandard library suffix
|
||||
#
|
||||
###########################################################################
|
||||
#
|
||||
# NOTE: This file is deprecated.
|
||||
#
|
||||
# In OIIO 2.1+, we generate OpenImageIOConfig.cmake files that are now the
|
||||
# preferred way for downstream projecs to find an installed OIIO. There
|
||||
# should be no need to copy this FindOpenImageIO.cmake file into downstream
|
||||
# projects, *unless* they need to work with a range of OIIO vesions that
|
||||
# may include <2.1, which would lack the generated config files.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
|
||||
# If 'OPENIMAGE_HOME' not set, use the env variable of that name if available
|
||||
if (NOT OPENIMAGEIO_ROOT_DIR AND NOT $ENV{OPENIMAGEIO_ROOT_DIR} STREQUAL "")
|
||||
set (OPENIMAGEIO_ROOT_DIR $ENV{OPENIMAGEIO_ROOT_DIR})
|
||||
endif ()
|
||||
|
||||
|
||||
find_library ( OPENIMAGEIO_LIBRARY
|
||||
NAMES OpenImageIO${OIIO_LIBNAME_SUFFIX}
|
||||
HINTS ${OPENIMAGEIO_ROOT_DIR}
|
||||
PATH_SUFFIXES lib64 lib )
|
||||
find_path ( OPENIMAGEIO_INCLUDE_DIR
|
||||
NAMES OpenImageIO/imageio.h
|
||||
HINTS ${OPENIMAGEIO_ROOT_DIR} )
|
||||
find_program ( OIIOTOOL_BIN
|
||||
NAMES oiiotool
|
||||
HINTS ${OPENIMAGEIO_ROOT_DIR} )
|
||||
|
||||
# Try to figure out version number
|
||||
set (OIIO_VERSION_HEADER "${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/oiioversion.h")
|
||||
if (EXISTS "${OIIO_VERSION_HEADER}")
|
||||
file (STRINGS "${OIIO_VERSION_HEADER}" TMP REGEX "^#define OIIO_VERSION_MAJOR .*$")
|
||||
string (REGEX MATCHALL "[0-9]+" OPENIMAGEIO_VERSION_MAJOR ${TMP})
|
||||
file (STRINGS "${OIIO_VERSION_HEADER}" TMP REGEX "^#define OIIO_VERSION_MINOR .*$")
|
||||
string (REGEX MATCHALL "[0-9]+" OPENIMAGEIO_VERSION_MINOR ${TMP})
|
||||
file (STRINGS "${OIIO_VERSION_HEADER}" TMP REGEX "^#define OIIO_VERSION_PATCH .*$")
|
||||
string (REGEX MATCHALL "[0-9]+" OPENIMAGEIO_VERSION_PATCH ${TMP})
|
||||
file (STRINGS "${OIIO_VERSION_HEADER}" TMP REGEX "^#define OIIO_VERSION_TWEAK .*$")
|
||||
if (TMP)
|
||||
string (REGEX MATCHALL "[0-9]+" OPENIMAGEIO_VERSION_TWEAK ${TMP})
|
||||
else ()
|
||||
set (OPENIMAGEIO_VERSION_TWEAK 0)
|
||||
endif ()
|
||||
set (OPENIMAGEIO_VERSION "${OPENIMAGEIO_VERSION_MAJOR}.${OPENIMAGEIO_VERSION_MINOR}.${OPENIMAGEIO_VERSION_PATCH}.${OPENIMAGEIO_VERSION_TWEAK}")
|
||||
endif ()
|
||||
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (OpenImageIO
|
||||
FOUND_VAR OPENIMAGEIO_FOUND
|
||||
REQUIRED_VARS OPENIMAGEIO_INCLUDE_DIR OPENIMAGEIO_LIBRARY
|
||||
OPENIMAGEIO_VERSION
|
||||
VERSION_VAR OPENIMAGEIO_VERSION
|
||||
)
|
||||
|
||||
if (OPENIMAGEIO_FOUND)
|
||||
set (OPENIMAGEIO_INCLUDES ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
set (OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
|
||||
get_filename_component (OPENIMAGEIO_LIBRARY_DIRS "${OPENIMAGEIO_LIBRARY}" DIRECTORY)
|
||||
if (NOT OpenImageIO_FIND_QUIETLY)
|
||||
message ( STATUS "OpenImageIO includes = ${OPENIMAGEIO_INCLUDE_DIR}" )
|
||||
message ( STATUS "OpenImageIO libraries = ${OPENIMAGEIO_LIBRARIES}" )
|
||||
message ( STATUS "OpenImageIO library_dirs = ${OPENIMAGEIO_LIBRARY_DIRS}" )
|
||||
message ( STATUS "OpenImageIO oiiotool = ${OIIOTOOL_BIN}" )
|
||||
endif ()
|
||||
|
||||
if (NOT TARGET OpenImageIO::OpenImageIO)
|
||||
add_library(OpenImageIO::OpenImageIO UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenImageIO::OpenImageIO PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPENIMAGEIO_INCLUDES}")
|
||||
|
||||
set_property(TARGET OpenImageIO::OpenImageIO APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${OPENIMAGEIO_LIBRARIES}")
|
||||
endif ()
|
||||
|
||||
if (NOT TARGET OpenImageIO::oiiotool AND EXISTS "${OIIOTOOL_BIN}")
|
||||
add_executable(OpenImageIO::oiiotool IMPORTED)
|
||||
set_target_properties(OpenImageIO::oiiotool PROPERTIES
|
||||
IMPORTED_LOCATION "${OIIOTOOL_BIN}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (
|
||||
OPENIMAGEIO_INCLUDE_DIR
|
||||
OPENIMAGEIO_LIBRARY
|
||||
)
|
||||
@@ -1,13 +1,13 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
###########################################################################
|
||||
# CMake module to find OptiX
|
||||
#
|
||||
# This module will set
|
||||
# OPTIX_FOUND True, if OptiX is found
|
||||
# OPTIX_INCLUDE_DIR directory where OptiX headers are found
|
||||
# OPTIX_INCLUDES directory where OptiX headers are found
|
||||
# OPTIX_LIBRARIES libraries for OptiX
|
||||
#
|
||||
# Special inputs:
|
||||
@@ -52,16 +52,18 @@ macro(OPTIX_find_api_library name version)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Pull out the API version from optix.h
|
||||
file(STRINGS ${OPTIX_INCLUDE_DIR}/optix.h OPTIX_VERSION_LINE LIMIT_COUNT 1 REGEX "define OPTIX_VERSION")
|
||||
string(REGEX MATCH "([0-9]+)" OPTIX_VERSION_STRING "${OPTIX_VERSION_LINE}")
|
||||
math(EXPR OPTIX_VERSION_MAJOR "${OPTIX_VERSION_STRING}/10000")
|
||||
math(EXPR OPTIX_VERSION_MINOR "(${OPTIX_VERSION_STRING}%10000)/100")
|
||||
math(EXPR OPTIX_VERSION_MICRO "${OPTIX_VERSION_STRING}%100")
|
||||
set(OPTIX_VERSION "${OPTIX_VERSION_MAJOR}.${OPTIX_VERSION_MINOR}.${OPTIX_VERSION_MICRO}")
|
||||
if (OPTIX_INCLUDE_DIR)
|
||||
# Pull out the API version from optix.h
|
||||
file(STRINGS ${OPTIX_INCLUDE_DIR}/optix.h OPTIX_VERSION_LINE LIMIT_COUNT 1 REGEX "define OPTIX_VERSION")
|
||||
string(REGEX MATCH "([0-9]+)" OPTIX_VERSION_STRING "${OPTIX_VERSION_LINE}")
|
||||
math(EXPR OPTIX_VERSION_MAJOR "${OPTIX_VERSION_STRING}/10000")
|
||||
math(EXPR OPTIX_VERSION_MINOR "(${OPTIX_VERSION_STRING}%10000)/100")
|
||||
math(EXPR OPTIX_VERSION_MICRO "${OPTIX_VERSION_STRING}%100")
|
||||
set(OPTIX_VERSION "${OPTIX_VERSION_MAJOR}.${OPTIX_VERSION_MINOR}.${OPTIX_VERSION_MICRO}")
|
||||
endif ()
|
||||
|
||||
# OptiX 7 doesn't link to any libraries
|
||||
if (${OPTIX_VERSION_MAJOR} LESS 7)
|
||||
if (OPTIX_VERSION VERSION_LESS 7)
|
||||
OPTIX_find_api_library(optix ${OPTIX_VERSION})
|
||||
OPTIX_find_api_library(optixu ${OPTIX_VERSION})
|
||||
OPTIX_find_api_library(optix_prime ${OPTIX_VERSION})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Find the Partio library.
|
||||
#
|
||||
@@ -10,7 +10,7 @@
|
||||
# PARTIO_LIBRARIES - library to link against
|
||||
# PARTIO_FOUND - true if Partio was found.
|
||||
|
||||
# Hack! perfer a config if it can be found
|
||||
# Hack! prefer a config if it can be found
|
||||
find_package(partio CONFIG)
|
||||
if (PARTIO_FOUND OR partio_FOUND)
|
||||
if (VERBOSE)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Find the pugixml XML parsing library.
|
||||
#
|
||||
# Sets the usual variables expected for find_package scripts:
|
||||
#
|
||||
# PUGIXML_INCLUDES - header location
|
||||
# PUGIXML_LIBRARIES - library to link against
|
||||
# PUGIXML_FOUND - true if pugixml was found.
|
||||
|
||||
# First try the config files and hope they're good enough
|
||||
find_package (pugixml CONFIG)
|
||||
|
||||
if (TARGET pugixml::pugixml)
|
||||
# New pugixml (>= 1.11) has nice config files we can rely on and makes a
|
||||
# pugixml::pugixml target.
|
||||
message (STATUS "Found CONFIG for pugixml (>=1.11)")
|
||||
|
||||
set (PUGIXML_FOUND true)
|
||||
set (pugixml_FOUND true)
|
||||
get_target_property(PUGIXML_INCLUDES pugixml::pugixml INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(PUGIXML_LIBRARIES pugixml::pugixml INTERFACE_LINK_LIBRARIES)
|
||||
|
||||
# elseif (TARGET pugixml)
|
||||
# # But older pugixml (<= 1.10) has mediocre config files that are not
|
||||
# # reliable in practice. They also only define a "pugixml" target but
|
||||
# # not "pugixml::pugixml". So just fall through to the "no config" case
|
||||
# # below, and figure everything out by hand.
|
||||
|
||||
else ()
|
||||
# If no config file is found for PugiXML, do it the old fashioned way.
|
||||
find_path (PUGIXML_INCLUDE_DIR
|
||||
NAMES pugixml.hpp
|
||||
#HINTS ${OpenImageIO_INCLUDE_DIR}/detail/pugixml
|
||||
PATH_SUFFIXES pugixml-1.8 pugixml-1.9 pugixml-1.10)
|
||||
set (pugixml_required_vars PUGIXML_INCLUDE_DIR)
|
||||
find_library (PUGIXML_LIBRARY
|
||||
NAMES pugixml
|
||||
PATH_SUFFIXES pugixml-1.8 pugixml-1.9 pugixml-1.10)
|
||||
|
||||
if (PUGIXML_INCLUDE_DIR)
|
||||
file (STRINGS "${PUGIXML_INCLUDE_DIR}/pugixml.hpp" TMP REGEX "define PUGIXML_VERSION .*$")
|
||||
string (REGEX MATCHALL "[0-9]+" PUGIXML_CODED_VERSION ${TMP})
|
||||
if (PUGIXML_CODED_VERSION VERSION_GREATER_EQUAL 1000)
|
||||
math (EXPR PUGIXML_VERSION_MAJOR "${PUGIXML_CODED_VERSION} / 1000")
|
||||
math (EXPR PUGIXML_VERSION_MINOR "(${PUGIXML_CODED_VERSION} % 1000) / 10")
|
||||
else ()
|
||||
math (EXPR PUGIXML_VERSION_MAJOR "${PUGIXML_CODED_VERSION} / 100")
|
||||
math (EXPR PUGIXML_VERSION_MINOR "(${PUGIXML_CODED_VERSION} % 100) / 10")
|
||||
endif ()
|
||||
set (PUGIXML_VERSION ${PUGIXML_VERSION_MAJOR}.${PUGIXML_VERSION_MINOR})
|
||||
endif ()
|
||||
|
||||
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (pugixml DEFAULT_MSG
|
||||
#PUGIXML_LIBRARY
|
||||
PUGIXML_INCLUDE_DIR)
|
||||
|
||||
if (PUGIXML_FOUND OR pugixml_FOUND)
|
||||
set (PUGIXML_INCLUDES ${PUGIXML_INCLUDE_DIR})
|
||||
set (PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
|
||||
|
||||
if (NOT TARGET pugixml::pugixml)
|
||||
add_library(pugixml::pugixml UNKNOWN IMPORTED)
|
||||
set_target_properties(pugixml::pugixml PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PUGIXML_INCLUDES}")
|
||||
if (PUGIXML_LIBRARIES)
|
||||
set_property(TARGET pugixml::pugixml APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${PUGIXML_LIBRARIES}")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,34 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/
|
||||
|
||||
#########################################################################
|
||||
# Packaging
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
# "Vendor" is only used in copyright notices, so we use the same thing that
|
||||
# the rest of the copyright notices say.
|
||||
set (CPACK_PACKAGE_VENDOR ${PROJECT_AUTHORS})
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Shading Language is the de facto standard for shading in modern path tracers used in film VFX and animation")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/src/doc/Description.txt")
|
||||
set (CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-${platform})
|
||||
file (COPY "${PROJECT_SOURCE_DIR}/LICENSE.md" DESTINATION "${CMAKE_BINARY_DIR}")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/LICENSE.md")
|
||||
file (COPY "${PROJECT_SOURCE_DIR}/README.md" DESTINATION "${CMAKE_BINARY_DIR}")
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.md")
|
||||
set (CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/src/doc/Welcome.txt")
|
||||
#set (CPACK_PACKAGE_EXECUTABLES I'm not sure what this is for)
|
||||
#set (CPACK_STRIP_FILES Do we need this?)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set (CPACK_GENERATOR "TGZ;STGZ;RPM;DEB")
|
||||
set (CPACK_SOURCE_GENERATOR "TGZ")
|
||||
endif ()
|
||||
if (APPLE)
|
||||
set (CPACK_GENERATOR "TGZ;STGZ;PackageMaker")
|
||||
set (CPACK_SOURCE_GENERATOR "TGZ")
|
||||
endif ()
|
||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-source)
|
||||
#set (CPACK_SOURCE_STRIP_FILES ...FIXME...)
|
||||
set (CPACK_SOURCE_IGNORE_FILES ".*~")
|
||||
include (CPack)
|
||||
+32
-31
@@ -1,10 +1,10 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
# Python-related options.
|
||||
option (USE_PYTHON "Build the Python bindings" ON)
|
||||
set (PYTHON_VERSION "2.7" CACHE STRING "Target version of python to find")
|
||||
set (PYTHON_VERSION "" CACHE STRING "Target version of python to try to find")
|
||||
option (PYLIB_INCLUDE_SONAME "If ON, soname/soversion will be set for Python module library" OFF)
|
||||
option (PYLIB_LIB_PREFIX "If ON, prefix the Python module with 'lib'" OFF)
|
||||
set (PYMODULE_SUFFIX "" CACHE STRING "Suffix to add to Python module init namespace")
|
||||
@@ -12,10 +12,6 @@ set (PYMODULE_SUFFIX "" CACHE STRING "Suffix to add to Python module init namesp
|
||||
|
||||
# Find Python. This macro should only be called if python is required. If
|
||||
# Python cannot be found, it will be a fatal error.
|
||||
# Variables set by this macro:
|
||||
# PYTHON_INCLUDES_PATH - directory where python headers are found
|
||||
# PYTHON_LIBRARIES - python libraries to link
|
||||
# PYTHON_SITE_DIR - our own install dir where our python moduels go
|
||||
macro (find_python)
|
||||
if (NOT VERBOSE)
|
||||
set (PythonInterp_FIND_QUIETLY true)
|
||||
@@ -24,34 +20,41 @@ macro (find_python)
|
||||
|
||||
# Attempt to find the desired version, but fall back to other
|
||||
# additional versions.
|
||||
checked_find_package (PythonInterp ${PYTHON_VERSION} REQUIRED)
|
||||
unset (_req)
|
||||
if (USE_PYTHON)
|
||||
set (_req REQUIRED)
|
||||
if (PYTHON_VERSION)
|
||||
list (APPEND _req EXACT)
|
||||
endif ()
|
||||
endif ()
|
||||
checked_find_package (Python ${PYTHON_VERSION}
|
||||
${_req}
|
||||
COMPONENTS Interpreter Development
|
||||
PRINT Python_Development_FOUND Python_VERSION
|
||||
Python_EXECUTABLE Python_LIBRARIES
|
||||
Python_Development_FOUND Python_Interpreter_FOUND)
|
||||
|
||||
# The version that was found may not be the default or user
|
||||
# defined one.
|
||||
set (PYTHON_VERSION_FOUND ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
set (PYTHON_VERSION_FOUND ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR})
|
||||
|
||||
if (NOT ${PYTHON_VERSION} VERSION_EQUAL ${PYTHON_VERSION_FOUND} )
|
||||
message (WARNING "The requested version ${PYTHON_VERSION} was not found.")
|
||||
message (WARNING "Using ${PYTHON_VERSION_FOUND} instead.")
|
||||
endif ()
|
||||
|
||||
checked_find_package (PythonLibs ${PYTHON_VERSION_FOUND} REQUIRED)
|
||||
if (VERBOSE)
|
||||
message (STATUS " Python include dirs ${PYTHON_INCLUDE_PATH}")
|
||||
message (STATUS " Python libraries ${PYTHON_LIBRARIES}")
|
||||
message (STATUS " Python site packages dir ${PYTHON_SITE_DIR}")
|
||||
message (STATUS " Python to include 'lib' prefix: ${PYLIB_LIB_PREFIX}")
|
||||
message (STATUS " Python to include SO version: ${PYLIB_INCLUDE_SONAME}")
|
||||
message (STATUS " Python version ${PYTHON_VERSION_STRING}")
|
||||
message (STATUS " Python version major: ${PYTHON_VERSION_MAJOR} minor: ${PYTHON_VERSION_MINOR}")
|
||||
endif ()
|
||||
# Give hints to subsequent pybind11 searching to ensure that it finds
|
||||
# exactly the same version that we found.
|
||||
set (PythonInterp_FIND_VERSION PYTHON_VERSION_FOUND)
|
||||
set (PythonInterp_FIND_VERSION_MAJOR ${Python_VERSION_MAJOR})
|
||||
|
||||
if (NOT DEFINED PYTHON_SITE_DIR)
|
||||
set (PYTHON_SITE_DIR "${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_FOUND}/site-packages")
|
||||
endif ()
|
||||
if (VERBOSE)
|
||||
message (STATUS " Python site packages dir ${PYTHON_SITE_DIR}")
|
||||
message (STATUS " Python to include 'lib' prefix: ${PYLIB_LIB_PREFIX}")
|
||||
message (STATUS " Python to include SO version: ${PYLIB_INCLUDE_SONAME}")
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
|
||||
|
||||
###########################################################################
|
||||
# pybind11
|
||||
|
||||
@@ -61,7 +64,7 @@ macro (setup_python_module)
|
||||
|
||||
set (target_name ${lib_TARGET})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT ${CMAKE_COMPILER_ID} STREQUAL "Intel")
|
||||
# Seems to be a problem on some systems, with pybind11 and python headers
|
||||
set_property (SOURCE ${lib_SOURCES} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-macro-redefined ")
|
||||
endif ()
|
||||
@@ -69,16 +72,14 @@ macro (setup_python_module)
|
||||
# Add the library itself
|
||||
add_library (${target_name} MODULE ${lib_SOURCES})
|
||||
|
||||
# Set up include dirs for python & pybind11
|
||||
target_include_directories (${target_name} SYSTEM PRIVATE ${PYTHON_INCLUDE_PATH})
|
||||
|
||||
# Declare the libraries it should link against
|
||||
target_link_libraries (${target_name} PRIVATE
|
||||
pybind11::pybind11 ${lib_LIBS} ${SANITIZE_LIBRARIES})
|
||||
target_link_libraries (${target_name}
|
||||
PRIVATE
|
||||
pybind11::pybind11
|
||||
Python::Python
|
||||
${lib_LIBS})
|
||||
if (APPLE)
|
||||
set_target_properties (${target_name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
||||
else ()
|
||||
target_link_libraries (${target_name} PRIVATE ${PYTHON_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
# Exclude the 'lib' prefix from the name
|
||||
|
||||
@@ -0,0 +1,404 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/
|
||||
|
||||
include (CTest)
|
||||
|
||||
# Make a build/platform/testsuite directory, and copy the master runtest.py
|
||||
# there. The rest is up to the tests themselves.
|
||||
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testsuite")
|
||||
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/testsuite/common"
|
||||
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/testsuite")
|
||||
add_custom_command (OUTPUT "${CMAKE_BINARY_DIR}/testsuite/runtest.py"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${CMAKE_SOURCE_DIR}/testsuite/runtest.py"
|
||||
"${CMAKE_BINARY_DIR}/testsuite/runtest.py"
|
||||
MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/testsuite/runtest.py")
|
||||
add_custom_target ( CopyFiles ALL DEPENDS "${CMAKE_BINARY_DIR}/testsuite/runtest.py" )
|
||||
|
||||
|
||||
set (OSL_TEST_BIG_TIMEOUT 800 CACHE STRING "Timeout for tests that take a long time")
|
||||
|
||||
|
||||
# add_one_testsuite() - set up one testsuite entry
|
||||
#
|
||||
# Usage:
|
||||
# add_one_testsuite ( testname
|
||||
# testsrcdir - Current test directory in ${CMAKE_SOURCE_DIR}
|
||||
# testdir - Current test sandbox in ${CMAKE_BINARY_DIR}
|
||||
# [ENV env1=val1 env2=val2 ... ] - env vars to set
|
||||
# [COMMAND cmd...] - optional override of launch command
|
||||
# )
|
||||
#
|
||||
|
||||
macro (add_one_testsuite testname testsrcdir)
|
||||
cmake_parse_arguments (_tst "" "" "ENV;COMMAND" ${ARGN})
|
||||
set (testsuite "${CMAKE_SOURCE_DIR}/testsuite")
|
||||
set (testdir "${CMAKE_BINARY_DIR}/testsuite/${testname}")
|
||||
file (MAKE_DIRECTORY "${testdir}")
|
||||
if (NOT _tst_COMMAND)
|
||||
set (_tst_COMMAND ${Python_EXECUTABLE} "${testsuite}/runtest.py" ${testdir})
|
||||
if (MSVC_IDE)
|
||||
list (APPEND _tst_COMMAND --devenv-config $<CONFIGURATION>
|
||||
--solution-path "${CMAKE_BINARY_DIR}" )
|
||||
endif ()
|
||||
endif ()
|
||||
list (APPEND _tst_ENV
|
||||
OpenImageIO_ROOT=${OpenImageIO_ROOT}
|
||||
OSL_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
OSL_BUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
OSL_TESTSUITE_ROOT=${testsuite}
|
||||
OSL_TESTSUITE_SRC=${testsrcdir}
|
||||
OSL_TESTSUITE_CUR=${testdir}
|
||||
)
|
||||
|
||||
# We need to suppress the leak sanitizer for "texture" tests, because of a
|
||||
# minor leak inside OIIO (140 bytes! -- inconsequential) but which we
|
||||
# can't use the suppressions list becuase the leaks come from calls made
|
||||
# inside JITed code for which there is not a good stack trace. Any real
|
||||
# leaks from OIIO or its dependencies we assume will be caught by lsan on
|
||||
# the OIIO side, where there is no JIT to complicate things.
|
||||
if (${testname} MATCHES "^texture" OR ${testname} MATCHES "gettextureinfo")
|
||||
list (APPEND _tst_ENV ASAN_OPTIONS=detect_leaks=0:$ENV{ASAN_OPTIONS})
|
||||
endif ()
|
||||
|
||||
add_test ( NAME ${testname} COMMAND ${_tst_COMMAND} )
|
||||
# message ("Test -- env ${_tst_ENV} cmd ${_tst_COMMAND}")
|
||||
set_tests_properties (${testname} PROPERTIES ENVIRONMENT "${_tst_ENV}" )
|
||||
# Certain tests are already internally multi-threaded, so to keep them
|
||||
# from piling up together, allocate a few cores each.
|
||||
if (${testname} MATCHES "^render-")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS render
|
||||
PROCESSORS 4 COST 10 TIMEOUT ${OSL_TEST_BIG_TIMEOUT})
|
||||
endif ()
|
||||
# Some labeling for fun
|
||||
if (${testname} MATCHES "^texture")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS texture
|
||||
PROCESSORS 2 COST 4)
|
||||
endif ()
|
||||
if (${testname} MATCHES "noise")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS noise
|
||||
PROCESSORS 2 COST 4)
|
||||
endif ()
|
||||
if (${testname} MATCHES "optix")
|
||||
set_tests_properties (${testname} PROPERTIES LABELS optix)
|
||||
if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "10.0")
|
||||
# Make sure libnvrtc-builtins.so is reachable
|
||||
set_property (TEST ${testname} APPEND PROPERTY ENVIRONMENT LD_LIBRARY_PATH=${CUDA_TOOLKIT_ROOT_DIR}/lib64:$ENV{LD_LIBRARY_PATH})
|
||||
endif()
|
||||
endif ()
|
||||
if (${testname} MATCHES "-reg")
|
||||
# These are batched shading regression tests. Some are quite
|
||||
# long, so give them a higher cost and timeout.
|
||||
set_tests_properties (${testname} PROPERTIES LABELS batchregression
|
||||
COST 15 TIMEOUT ${OSL_TEST_BIG_TIMEOUT})
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
|
||||
macro ( TESTSUITE )
|
||||
cmake_parse_arguments (_ats "" "LABEL;FOUNDVAR;TESTNAME" "" ${ARGN})
|
||||
# If there was a FOUNDVAR param specified and that variable name is
|
||||
# not defined, mark the test as broken.
|
||||
if (_ats_FOUNDVAR AND NOT ${_ats_FOUNDVAR})
|
||||
set (_ats_LABEL "broken")
|
||||
endif ()
|
||||
set (test_all_optix $ENV{TESTSUITE_OPTIX})
|
||||
set (test_all_batched $ENV{TESTSUITE_BATCHED})
|
||||
set (test_all_rs_bitcode $ENV{TESTSUITE_RS_BITCODE})
|
||||
# Add the tests if all is well.
|
||||
set (ALL_TEST_LIST "")
|
||||
set (_testsuite "${CMAKE_SOURCE_DIR}/testsuite")
|
||||
foreach (_testname ${_ats_UNPARSED_ARGUMENTS})
|
||||
set (_testsrcdir "${_testsuite}/${_testname}")
|
||||
if (_ats_TESTNAME)
|
||||
set (_testname "${_ats_TESTNAME}")
|
||||
endif ()
|
||||
if (_ats_LABEL MATCHES "broken")
|
||||
set (_testname "${_testname}-broken")
|
||||
endif ()
|
||||
|
||||
set (ALL_TEST_LIST "${ALL_TEST_LIST} ${_testname}")
|
||||
|
||||
# Run the test unoptimized, unless it matches a few patterns that
|
||||
# we don't test unoptimized (or has an OPTIMIZEONLY marker file).
|
||||
if (NOT _testname MATCHES "optix"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOSCALAR"
|
||||
AND NOT EXISTS "${_testsrcdir}/BATCHED_REGRESSION"
|
||||
AND NOT EXISTS "${_testsrcdir}/OPTIMIZEONLY")
|
||||
add_one_testsuite ("${_testname}" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=0 )
|
||||
endif ()
|
||||
# Run the same test again with aggressive -O2 runtime
|
||||
# optimization, triggered by setting TESTSHADE_OPT env variable.
|
||||
# Skip OptiX-only tests and those with a NOOPTIMIZE marker file.
|
||||
if (NOT _testname MATCHES "optix"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOSCALAR"
|
||||
AND NOT EXISTS "${_testsrcdir}/BATCHED_REGRESSION"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
add_one_testsuite ("${_testname}.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 )
|
||||
endif ()
|
||||
if (_testname MATCHES "render-" AND ${CMAKE_BUILD_TYPE} STREQUAL Debug)
|
||||
set_tests_properties (${_testname} PROPERTIES TIMEOUT ${OSL_TEST_BIG_TIMEOUT})
|
||||
endif ()
|
||||
# When building for OptiX support, also run it in OptiX mode
|
||||
# if there is an OPTIX marker file in the directory.
|
||||
# If an environment variable $TESTSUITE_OPTIX is nonzero, then
|
||||
# run all tests with OptiX, even if there's no OPTIX marker.
|
||||
if (USE_OPTIX
|
||||
AND (EXISTS "${_testsrcdir}/OPTIX" OR test_all_optix OR _testname MATCHES "optix")
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIX"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIX-FIXME"
|
||||
AND NOT EXISTS "${_testsrcdir}/BATCHED_REGRESSION")
|
||||
# Unoptimized
|
||||
if (NOT EXISTS "${_testsrcdir}/OPTIMIZEONLY")
|
||||
add_one_testsuite ("${_testname}.optix" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=0 TESTSHADE_OPTIX=1 )
|
||||
endif ()
|
||||
# and optimized
|
||||
add_one_testsuite ("${_testname}.optix.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 TESTSHADE_OPTIX=1 )
|
||||
endif ()
|
||||
|
||||
if (BUILD_BATCHED)
|
||||
# When building for Batched support, also run it in Batched mode
|
||||
# if there is an BATCHED marker file in the directory.
|
||||
# If an environment variable $TESTSUITE_BATCHED is nonzero, then
|
||||
# run all tests in Batched mode, even if there's no BATCHED marker.
|
||||
if ((EXISTS "${_testsrcdir}/BATCHED" OR test_all_batched OR _testname MATCHES "batched")
|
||||
AND NOT EXISTS "${_testsrcdir}/BATCHED_REGRESSION"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOBATCHED"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOBATCHED-FIXME"
|
||||
AND NOT EXISTS "${_testsrcdir}/OPTIMIZEONLY")
|
||||
add_one_testsuite ("${_testname}.batched" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=0 TESTSHADE_BATCHED=1 )
|
||||
endif ()
|
||||
|
||||
if ((EXISTS "${_testsrcdir}/BATCHED" OR test_all_batched OR _testname MATCHES "batched")
|
||||
AND NOT EXISTS "${_testsrcdir}/BATCHED_REGRESSION"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOBATCHED"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOBATCHED-FIXME"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
add_one_testsuite ("${_testname}.batched.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 TESTSHADE_BATCHED=1 )
|
||||
endif ()
|
||||
|
||||
# When building for Batched support, optionally run a regression test
|
||||
# if there is an BATCHED_REGRESSION marker file in the directory.
|
||||
if ((EXISTS "${_testsrcdir}/BATCHED_REGRESSION")
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
# optimized for right now
|
||||
add_one_testsuite ("${_testname}.regress.batched.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 OSL_REGRESSION_TEST=BATCHED )
|
||||
endif ()
|
||||
if ((EXISTS "${_testsrcdir}/BATCHED_REGRESSION")
|
||||
AND EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
# not optimized
|
||||
add_one_testsuite ("${_testname}.regress.batched" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=0 OSL_REGRESSION_TEST=BATCHED )
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# if there is an RS_BITCODE marker file in the directory.
|
||||
if ((EXISTS "${_testsrcdir}/RS_BITCODE" OR test_all_rs_bitcode)
|
||||
AND NOT EXISTS "${_testsrcdir}/BATCHED_REGRESSION"
|
||||
AND NOT EXISTS "${_testsrcdir}/RS_BITCODE_REGRESSION"
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
add_one_testsuite ("${_testname}.rsbitcode.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 TESTSHADE_RS_BITCODE=1 )
|
||||
endif ()
|
||||
|
||||
# if there is an RS_BITCODE_REGRESSION marker file in the directory.
|
||||
if (EXISTS "${_testsrcdir}/RS_BITCODE_REGRESSION" OR (
|
||||
test_all_rs_bitcode AND EXISTS "${_testsrcdir}/BATCHED_REGRESSION")
|
||||
AND NOT EXISTS "${_testsrcdir}/NOOPTIMIZE")
|
||||
# optimized for right now
|
||||
add_one_testsuite ("${_testname}.regress.rsbitcode.opt" "${_testsrcdir}"
|
||||
ENV TESTSHADE_OPT=2 OSL_REGRESSION_TEST=RS_BITCODE )
|
||||
endif ()
|
||||
|
||||
endforeach ()
|
||||
if (VERBOSE)
|
||||
message (STATUS "Added tests: ${ALL_TEST_LIST}")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
macro (osl_add_all_tests)
|
||||
# List all the individual testsuite tests here, except those that need
|
||||
# special installed tests.
|
||||
TESTSUITE ( aastep allowconnect-err andor-reg and-or-not-synonyms
|
||||
arithmetic area-reg arithmetic-reg
|
||||
array array-reg array-copy-reg array-derivs array-range
|
||||
array-aassign array-assign-reg array-length-reg
|
||||
bitwise-and-reg bitwise-or-reg bitwise-shl-reg bitwise-shr-reg bitwise-xor-reg
|
||||
blackbody blackbody-reg blendmath breakcont breakcont-reg
|
||||
bug-array-heapoffsets bug-locallifetime bug-outputinit
|
||||
bug-param-duplicate bug-peep bug-return
|
||||
calculatenormal-reg
|
||||
cellnoise closure closure-array color color-reg colorspace comparison
|
||||
complement-reg compile-buffer compassign-reg
|
||||
component-range
|
||||
control-flow-reg connect-components
|
||||
const-array-params const-array-fill
|
||||
debugnan debug-uninit
|
||||
derivs derivs-muldiv-clobber
|
||||
draw_string
|
||||
error-dupes error-serialized
|
||||
example-deformer
|
||||
example-batched-deformer
|
||||
exit exponential
|
||||
filterwidth-reg
|
||||
for-reg format-reg fprintf
|
||||
function-earlyreturn function-simple function-outputelem
|
||||
function-overloads function-redef
|
||||
geomath getattribute-camera getattribute-shader
|
||||
getsymbol-nonheap gettextureinfo gettextureinfo-reg
|
||||
globals-needed
|
||||
group-outputs groupstring
|
||||
hash hashnoise hex hyperb
|
||||
ieee_fp ieee_fp-reg if if-reg incdec initlist
|
||||
initops initops-instance-clash
|
||||
intbits isconnected
|
||||
isconstant
|
||||
layers layers-Ciassign layers-entry layers-lazy layers-lazyerror
|
||||
layers-nonlazycopy layers-repeatedoutputs
|
||||
length-reg linearstep
|
||||
logic loop luminance-reg
|
||||
matrix matrix-reg matrix-arithmetic-reg
|
||||
matrix-compref-reg max-reg message message-no-closure message-reg
|
||||
mergeinstances-duplicate-entrylayers
|
||||
mergeinstances-nouserdata mergeinstances-vararray
|
||||
metadata-braces min-reg miscmath missing-shader
|
||||
mix-reg
|
||||
named-components
|
||||
noise noise-cell
|
||||
noise-gabor noise-gabor2d-filter noise-gabor3d-filter
|
||||
noise-gabor-reg
|
||||
noise-generic
|
||||
noise-perlin noise-simplex
|
||||
noise-reg
|
||||
normalize-reg
|
||||
pnoise pnoise-cell pnoise-gabor
|
||||
pnoise-generic pnoise-perlin
|
||||
pnoise-reg
|
||||
operator-overloading
|
||||
opt-warnings
|
||||
oslc-comma oslc-D oslc-M
|
||||
oslc-err-arrayindex oslc-err-assignmenttypes
|
||||
oslc-err-closuremul oslc-err-field
|
||||
oslc-err-format oslc-err-funcoverload
|
||||
oslc-err-intoverflow oslc-err-write-nonoutput
|
||||
oslc-err-noreturn oslc-err-notfunc
|
||||
oslc-err-initlist-args oslc-err-initlist-return
|
||||
oslc-err-named-components
|
||||
oslc-err-outputparamvararray oslc-err-paramdefault
|
||||
oslc-err-struct-array-init oslc-err-struct-ctr
|
||||
oslc-err-struct-dup oslc-err-struct-print
|
||||
oslc-err-type-as-variable
|
||||
oslc-err-unknown-ctr
|
||||
oslc-pragma-warnerr
|
||||
oslc-warn-commainit
|
||||
oslc-variadic-macro
|
||||
oslc-version
|
||||
oslinfo-arrayparams oslinfo-colorctrfloat
|
||||
oslinfo-metadata oslinfo-noparams
|
||||
osl-imageio
|
||||
paramval-floatpromotion
|
||||
pragma-nowarn
|
||||
printf-reg
|
||||
printf-whole-array
|
||||
raytype raytype-reg raytype-specialized regex-reg reparam
|
||||
render-background render-bumptest
|
||||
render-cornell render-furnace-diffuse
|
||||
render-mx-furnace-burley-diffuse
|
||||
render-mx-furnace-oren-nayar
|
||||
render-mx-furnace-sheen
|
||||
render-mx-burley-diffuse
|
||||
render-mx-dielectric render-mx-dielectric-glass
|
||||
render-mx-conductor
|
||||
render-mx-generalized-schlick render-mx-generalized-schlick-glass
|
||||
render-mx-layer
|
||||
render-mx-sheen
|
||||
render-microfacet render-oren-nayar
|
||||
render-uv render-veachmis render-ward
|
||||
select select-reg shaderglobals shortcircuit
|
||||
smoothstep-reg
|
||||
spline spline-reg splineinverse splineinverse-ident
|
||||
splineinverse-knots-ascend-reg splineinverse-knots-descend-reg
|
||||
spline-boundarybug spline-derivbug
|
||||
split-reg
|
||||
string string-reg
|
||||
struct struct-array struct-array-mixture
|
||||
struct-err struct-init-copy
|
||||
struct-isomorphic-overload struct-layers
|
||||
struct-operator-overload struct-return struct-with-array
|
||||
struct-nested struct-nested-assign struct-nested-deep
|
||||
ternary
|
||||
testshade-expr
|
||||
texture-alpha texture-alpha-derivs
|
||||
texture-blur texture-connected-options
|
||||
texture-derivs texture-environment texture-errormsg
|
||||
texture-environment-opts-reg
|
||||
texture-firstchannel texture-interp
|
||||
texture-missingalpha texture-missingcolor texture-opts-reg texture-simple
|
||||
texture-smallderivs texture-swirl texture-udim
|
||||
texture-width texture-withderivs texture-wrap
|
||||
trace-reg
|
||||
trailing-commas
|
||||
transcendental-reg
|
||||
transitive-assign
|
||||
transform transform-reg transformc transformc-reg trig trig-reg
|
||||
typecast
|
||||
unknown-instruction
|
||||
userdata userdata-passthrough
|
||||
vararray-connect vararray-default
|
||||
vararray-deserialize vararray-param
|
||||
vecctr vector vector-reg
|
||||
wavelength_color wavelength_color-reg Werror xml xml-reg )
|
||||
|
||||
# Coordinate-aware gettextureinfo only works for TextureSystem >= 2.3.7
|
||||
if (OpenImageIO_VERSION VERSION_GREATER_EQUAL 2.3.7)
|
||||
TESTSUITE ( gettextureinfo-udim gettextureinfo-udim-reg )
|
||||
endif ()
|
||||
|
||||
# Only run the ocio test if the OIIO we are using has OCIO support
|
||||
if (OpenImageIO_HAS_OpenColorIO)
|
||||
TESTSUITE ( ocio )
|
||||
endif ()
|
||||
|
||||
# Add tests that require the Python bindings if we built them.
|
||||
# We also exclude these tests if this is a sanitizer build, because the
|
||||
# Python interpreter itself won't be linked with the right asan
|
||||
# libraries to run correctly.
|
||||
if (USE_PYTHON AND NOT SANITIZE)
|
||||
TESTSUITE ( python-oslquery )
|
||||
endif ()
|
||||
|
||||
# Only run openvdb-related tests if the local OIIO has openvdb support.
|
||||
execute_process ( COMMAND ${OpenImageIO_LIB_DIR}/../bin/oiiotool --help
|
||||
OUTPUT_VARIABLE oiiotool_help )
|
||||
if (oiiotool_help MATCHES "openvdb")
|
||||
TESTSUITE ( texture3d texture3d-opts-reg )
|
||||
endif()
|
||||
|
||||
# Only run pointcloud tests if Partio is found
|
||||
if (PARTIO_FOUND)
|
||||
TESTSUITE ( pointcloud pointcloud-fold )
|
||||
endif ()
|
||||
|
||||
# Only run the OptiX tests if OptiX and CUDA are found
|
||||
if (OPTIX_FOUND AND CUDA_FOUND)
|
||||
TESTSUITE ( testoptix testoptix-noise example-cuda)
|
||||
endif ()
|
||||
|
||||
# Some regression tests have a lot of combinations and may need more time to finish
|
||||
if (BUILD_BATCHED)
|
||||
set_tests_properties (arithmetic-reg.regress.batched.opt
|
||||
PROPERTIES TIMEOUT ${OSL_TEST_BIG_TIMEOUT})
|
||||
set_tests_properties (transform-reg.regress.batched.opt
|
||||
PROPERTIES TIMEOUT ${OSL_TEST_BIG_TIMEOUT})
|
||||
endif ()
|
||||
set_tests_properties (matrix-reg.regress.rsbitcode.opt
|
||||
PROPERTIES TIMEOUT ${OSL_TEST_BIG_TIMEOUT})
|
||||
endmacro()
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
set (public_docs osl-languagespec.pdf
|
||||
testshade.md.html
|
||||
@@ -11,7 +11,7 @@ set (public_docs osl-languagespec.pdf
|
||||
|
||||
install (FILES ${public_docs} DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT documentation)
|
||||
|
||||
install ( FILES "${PROJECT_SOURCE_DIR}/LICENSE"
|
||||
install ( FILES "${PROJECT_SOURCE_DIR}/LICENSE.md"
|
||||
"${PROJECT_SOURCE_DIR}/INSTALL.md"
|
||||
"${PROJECT_SOURCE_DIR}/CHANGES.md"
|
||||
"${PROJECT_SOURCE_DIR}/README.md"
|
||||
@@ -43,7 +43,7 @@ macro (docdeep_generate)
|
||||
endif ()
|
||||
set (docdeep_program ${CMAKE_SOURCE_DIR}/src/build-scripts/docdeep.py)
|
||||
add_custom_command (OUTPUT ${mdfile}
|
||||
COMMAND python ${docdeep_program} -d ${_docdeep_NAME} -s docs.css
|
||||
COMMAND ${Python_EXECUTABLE} ${docdeep_program} -d ${_docdeep_NAME} -s docs.css
|
||||
${_docdeep_SOURCE} > "${CMAKE_CURRENT_BINARY_DIR}/${mdfile}"
|
||||
MAIN_DEPENDENCY ${docdeep_program}
|
||||
DEPENDS ${_docdeep_SOURCE}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/imageworks/OpenShadingLanguage
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
PDFLATEX_FLAGS = -interaction=errorstopmode ### "--shell-escape"
|
||||
|
||||
|
||||
+762
-92
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user