Skip to content

Commit

Permalink
Merge pull request #6044 from ericmehl/msvc2022
Browse files Browse the repository at this point in the history
Visual Studio 2022 build
  • Loading branch information
johnhaddon authored Sep 16, 2024
2 parents df98c13 + f7d04a4 commit e3116a7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,14 @@ jobs:
jobs: 4

- name: windows
os: windows-2019
os: windows-2022
buildType: RELEASE
publish: true
containerImage:
testRunner: Invoke-Expression
testArguments: -excludedCategories performance GafferTest GafferVDBTest GafferUSDTest GafferSceneTest GafferDispatchTest GafferOSLTest GafferImageTest GafferUITest GafferImageUITest GafferSceneUITest GafferDispatchUITest GafferOSLUITest GafferUSDUITest GafferVDBUITest GafferDelightUITest GafferTractorTest GafferTractorUITest
sconsCacheMegabytes: 800
jobs: 4
dependenciesURL: https://github.com/ImageEngine/cortex/releases/download/10.5.9.2/cortex-10.5.9.2-windows.zip

runs-on: ${{ matrix.os }}

Expand All @@ -87,7 +86,7 @@ jobs:

- uses: ilammy/msvc-dev-cmd@v1.13.0
with:
sdk: 10.0.17763.0
sdk: 10.0.19041.0

- name: Install toolchain (Windows)
run: |
Expand Down
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Fixes
- Fixed thread-safety bug.
- HierarchyView, SetEditor : Fixed thread-safety bugs.
- FreezeTransform : Constant primitive variables with point/vector interpretations are now also transformed.
- usdview : Added Windows support (#5599).

API
---
Expand Down Expand Up @@ -117,6 +118,7 @@ Build
- Qt : Updated to version 5.15.14.
- USD : Updated to version 24.08.
- Zstandard : Added version 1.5.0.
- Windows : Update compiler to Visual Studio 2022 / MSVC 17.8 / Runtime library 14.3.

1.4.x.x (relative to 1.4.12.0)
=======
Expand Down
10 changes: 6 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ options.Add( "GAFFER_VERSION_SUFFIX", "Version suffix", str( gafferVersionSuffix

env = Environment(

MSVC_VERSION = "14.2",
MSVC_VERSION = "14.3",

options = options,

Expand Down Expand Up @@ -588,6 +588,8 @@ else:
"/wd4003", # suppress warning "not enough arguments for function-like macro invocation 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'". Needed for USD.
"/wd4702", # suppress warning "unreachable code". Need for OpenVDB.
"/wd4180", # suppress warning "qualifier applied to function type has no meaning; ignored". Needed for OpenVDB
"/wd4146", # suppress warning "unary minus operator applied to unsigned type, result still unsigned" (from Cryptomatte::MurmurHash3_x86_32())
"/D_CRT_NONSTDC_NO_WARNINGS", # suppress warnings about deprecated POSIX names. The names are deprecated, not the functions, so this is safe.
],
)

Expand Down Expand Up @@ -1287,7 +1289,7 @@ libraries = {
"Gaffer", "GafferScene", "GafferDispatch", "GafferOSL"
] + cyclesLibraries + [
"OpenImageIO$OIIO_LIB_SUFFIX", "OpenImageIO_Util$OIIO_LIB_SUFFIX", "oslexec$OSL_LIB_SUFFIX", "oslquery$OSL_LIB_SUFFIX",
"openvdb$VDB_LIB_SUFFIX", "Alembic", "osdCPU", "OpenColorIO$OCIO_LIB_SUFFIX", "embree4", "Iex", "openpgl",
"openvdb$VDB_LIB_SUFFIX", "Alembic", "osdCPU", "OpenColorIO$OCIO_LIB_SUFFIX", "embree4", "Iex", "openpgl", "zstd",
],
"CXXFLAGS" : [ systemIncludeArgument, "$CYCLES_ROOT/include" ],
"CPPDEFINES" : cyclesDefines,
Expand All @@ -1299,7 +1301,7 @@ libraries = {
"Gaffer", "GafferScene", "GafferDispatch", "GafferBindings", "GafferCycles", "IECoreScene",
] + ( cyclesLibraries if includeCyclesLibrariesInPythonModule else [] ) + [
"OpenImageIO$OIIO_LIB_SUFFIX", "OpenImageIO_Util$OIIO_LIB_SUFFIX", "oslexec$OSL_LIB_SUFFIX", "openvdb$VDB_LIB_SUFFIX",
"oslquery$OSL_LIB_SUFFIX", "Alembic", "osdCPU", "OpenColorIO$OCIO_LIB_SUFFIX", "embree4", "Iex", "openpgl",
"oslquery$OSL_LIB_SUFFIX", "Alembic", "osdCPU", "OpenColorIO$OCIO_LIB_SUFFIX", "embree4", "Iex", "openpgl", "zstd",
],
"CXXFLAGS" : [ systemIncludeArgument, "$CYCLES_ROOT/include" ],
"CPPDEFINES" : cyclesDefines,
Expand Down Expand Up @@ -1452,7 +1454,7 @@ if env["PLATFORM"] == "win32" :

else :

libraries["GafferCycles"]["envAppends"]["LIBS"].extend( [ "dl", "zstd" ] )
libraries["GafferCycles"]["envAppends"]["LIBS"].extend( [ "dl" ] )

# Optionally add vTune requirements

Expand Down
2 changes: 1 addition & 1 deletion src/Gaffer/MonitorAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ struct HashesPerComputeMetric

// Utility for invoking a templated functor with a particular metric.
template<typename F>
std::result_of_t<F(const HashCountMetric &)> dispatchMetric( const F &f, MonitorAlgo::PerformanceMetric performanceMetric )
std::invoke_result_t<F, const HashCountMetric &> dispatchMetric( const F &f, MonitorAlgo::PerformanceMetric performanceMetric )
{
switch( performanceMetric )
{
Expand Down
4 changes: 2 additions & 2 deletions src/GafferCycles/IECoreCyclesPreview/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ class InstanceCache : public IECore::RefCounted

for( Geometry::iterator it = m_geometry.begin(), eIt = m_geometry.end(); it != eIt; ++it )
{
if( it->second.unique() )
if( it->second.use_count() == 1 )
{
// Only one reference - this is ours, so
// nothing outside of the cache is using the
Expand Down Expand Up @@ -1846,7 +1846,7 @@ class CameraCache : public IECore::RefCounted
vector<IECore::MurmurHash> toErase;
for( Cache::iterator it = m_cache.begin(), eIt = m_cache.end(); it != eIt; ++it )
{
if( it->second.unique() )
if( it->second.use_count() == 1 )
{
// Only one reference - this is ours, so
// nothing outside of the cache is using the
Expand Down
2 changes: 1 addition & 1 deletion src/IECoreArnold/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2276,7 +2276,7 @@ class InstanceCache : public IECore::RefCounted
vector<IECore::MurmurHash> toErase;
for( Cache::iterator it = m_cache.begin(), eIt = m_cache.end(); it != eIt; ++it )
{
if( it->second.unique() )
if( it->second.use_count() == 1 )
{
// Only one reference - this is ours, so
// nothing outside of the cache is using the
Expand Down
2 changes: 1 addition & 1 deletion src/IECoreDelight/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ class InstanceCache : public IECore::RefCounted
vector<IECore::MurmurHash> toErase;
for( Cache::iterator it = m_cache.begin(), eIt = m_cache.end(); it != eIt; ++it )
{
if( it->second.unique() )
if( it->second.use_count() == 1 )
{
// Only one reference - this is ours, so
// nothing outside of the cache is using the
Expand Down

0 comments on commit e3116a7

Please sign in to comment.