Skip to content

Commit 2dcd943

Browse files
authored
Merge pull request #1281 from ericmehl/windows-dependencies-6.0.0
Update for Windows dependencies 6.0.0
2 parents cdfe4a3 + cb1cfd5 commit 2dcd943

File tree

17 files changed

+204
-162
lines changed

17 files changed

+204
-162
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ jobs:
7575
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
7676
publish: true
7777

78+
- name: windows-python3
79+
os: windows-2019
80+
buildType: RELEASE
81+
options: .github/workflows/main/options.windows
82+
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.0.0/gafferDependencies-6.0.0-Python3-windows.zip
83+
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
84+
publish: false
85+
86+
- name: windows-python3-debug
87+
os: windows-2019
88+
buildType: RELWITHDEBINFO
89+
options: .github/workflows/main/options.windows
90+
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.0.0/gafferDependencies-6.0.0-Python3-windows.zip
91+
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
92+
publish: false
93+
7894
runs-on: ${{ matrix.os }}
7995

8096
container: ${{ matrix.containerImage }}
@@ -166,6 +182,7 @@ jobs:
166182
scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
167183
env:
168184
IECORE_RTLD_GLOBAL: 0
185+
OCIO: ${{ env.CORTEX_BUILD_NAME }}/openColorIO/config.ocio
169186

170187
- name: Build Package
171188
run: |

.github/workflows/main/options.windows

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ INSTALL_RMANDISPLAY_NAME = build + "\\renderMan\\displayDrivers\\ieDisplay"
1313
INSTALL_PYTHON_DIR = build + "\\python"
1414
INSTALL_IECORE_OPS = ""
1515

16-
# disable permissive mode, making MSVC more standards compliant
17-
# /D_USE_MATH_DEFINES is needed with permissive mode off for
18-
# common definitions like M_P
19-
# /Zc:externC- fixes a compilation error with Boost::interprocess
20-
# described here:
21-
# https://developercommunity.visualstudio.com/content/problem/756694/including-windowsh-and-boostinterprocess-headers-l.html
22-
CXXFLAGS = ["/permissive-", "/D_USE_MATH_DEFINES", "/Zc:externC-"]
23-
2416
LIBPATH = libs
2517

2618
PYTHON = deps + "\\bin\\python"
@@ -33,8 +25,9 @@ PYTHONPATH = deps + "\\python"
3325
# Libs
3426
# ====
3527

36-
BOOST_INCLUDE_PATH = includes + "\\boost-1_68"
37-
BOOST_LIB_SUFFIX = "-vc141-mt-x64-1_68"
28+
BOOST_INCLUDE_PATH = includes
29+
BOOST_LIB_SUFFIX = ""
30+
BOOST_LIB_PATH = libs
3831

3932
OPENEXR_INCLUDE_PATH = includes
4033
OIIO_INCLUDE_PATH = includes + "\\OpenImageIO"
@@ -53,6 +46,7 @@ GLEW_LIB_SUFFIX = "32"
5346
TBB_INCLUDE_PATH = includes
5447
USD_INCLUDE_PATH = includes
5548
USD_LIB_PATH = libs
49+
USD_LIB_PREFIX = "usd_"
5650
DOXYGEN = deps + "\\doxygen\\doxygen.exe"
5751

5852
# Renderers
@@ -76,5 +70,5 @@ WARNINGS_AS_ERRORS = "1"
7670

7771
# PATH is needed to locate the MSVC compiler. PROCESSOR_ARCHITECTURE and USERNAME
7872
# are needed by the HeaderGenerator and accompanying tests.
79-
ENV_VARS_TO_IMPORT = "PATH PROCESSOR_ARCHITECTURE USERNAME CI"
73+
ENV_VARS_TO_IMPORT = "PATH PROCESSOR_ARCHITECTURE USERNAME CI OCIO"
8074

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
*.pyc
88
*.dylib
99
*.code-workspace
10+
*.obj
11+
*.pyd
12+
*.pdb
13+
*.dll
14+
*.lib
15+
*.ilk
16+
*.exp
1017
.sconsign.dblite
1118
.sconf_temp
1219
.cproject

SConstruct

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,18 @@ o.Add(
8585

8686
)
8787

88+
# Windows : Disable permissive mode, making MSVC more standards compliant.
89+
# /D_USE_MATH_DEFINES is needed with permissive mode off for
90+
# common definitions like M_P.
91+
# /Zc:externC- fixes a compilation error with Boost::interprocess
92+
# described here:
93+
# https://developercommunity.visualstudio.com/content/problem/756694/including-windowsh-and-boostinterprocess-headers-l.html
94+
# /DBOOST_ALL_NO_LIB is needed to find Boost when it is built without
95+
# verbose system information added to file and directory names.
8896
o.Add(
8997
"CXXFLAGS",
9098
"The extra flags to pass to the C++ compiler during compilation.",
91-
[ "-pipe", "-Wall", "-Wextra" ] if Environment()["PLATFORM"] != "win32" else [],
99+
[ "-pipe", "-Wall", "-Wextra" ] if Environment()["PLATFORM"] != "win32" else [ "/permissive-", "/D_USE_MATH_DEFINES", "/Zc:externC-", "/DBOOST_ALL_NO_LIB" ],
92100
)
93101

94102
o.Add(
@@ -1171,7 +1179,6 @@ else:
11711179
"/D_WINDLL",
11721180
"/D_MBCS",
11731181
"/W4",
1174-
"/experimental:external",
11751182
"/external:W0",
11761183
"/Zc:inline", # Remove unreferenced function or data if it is COMDAT or has internal linkage only
11771184
"/GR", # enable RTTI
@@ -1196,6 +1203,13 @@ else:
11961203
"/wd4244", # suppress warning about possible loss of data in type conversion
11971204
"/wd4305", # suppress warning about conversion from double to float
11981205
"/wd4506", # suppress warning about no definition for inline function. Needed for USD::Glf
1206+
# NOTE : the following warnings are generated by external dependencies, even when using /external
1207+
# They may be able to be re-enabled after updating to MSVC 2022.
1208+
"/wd4127", # suppress warning "conditional expression is constant", Needed for USD
1209+
"/wd4456", # suppress warning "declaration of 'x' hides previous local declaration"
1210+
"/wd4459", # suppress warning "declaration of 'x' hides global declaration"
1211+
"/wd4201", # suppress warning "nonstandard extension used : nameless struct/union"
1212+
"/wd4245", # suppress warning "'initializing': conversion from 'int' to 'size_t', signed / unsigned mismatch
11991213
# suppress warning about exported class deriving from non-exported class.
12001214
# Microsoft states (in https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170)
12011215
# that "C4275 can be ignored if you are deriving from a type in the
@@ -2166,6 +2180,7 @@ if env["WITH_GL"] and doConfigure :
21662180
# while still using -Werror.
21672181
"-Wno-format" if env["PLATFORM"] != "win32" else "",
21682182
"-Wno-strict-aliasing" if env["PLATFORM"] != "win32" else "",
2183+
"/wd4701" if env["PLATFORM"] == "win32" else "",
21692184
systemIncludeArgument, "$GLEW_INCLUDE_PATH",
21702185
systemIncludeArgument, "$OIIO_INCLUDE_PATH",
21712186
],
@@ -3031,6 +3046,7 @@ if usdEnv["USD_LIB_PREFIX"] :
30313046
usdEnvAppends = {
30323047
"CXXFLAGS" : [
30333048
"-Wno-deprecated" if env["PLATFORM"] != "win32" else "",
3049+
"/Zc:inline-" if env["PLATFORM"] == "win32" else "",
30343050
"-DIECoreUSD_EXPORTS",
30353051
systemIncludeArgument, "$USD_INCLUDE_PATH",
30363052
systemIncludeArgument, "$PYTHON_INCLUDE_PATH",

0 commit comments

Comments
 (0)