Skip to content

Commit

Permalink
Update minimum C++ version to C++14
Browse files Browse the repository at this point in the history
This changelist updates the minimum C++ version in MaterialX 1.38.8 from C++11 to C++14, as approved in a recent meeting of the MaterialX TSC.

Additional changes include:

- Update documentation for minimum C++ version and compilers on each platform.
- Add initial usages of std::make_unique and [[deprecated]].
  • Loading branch information
jstone-lucasfilm committed Apr 23, 2023
1 parent f0cb7e1 commit 7fa59fa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(MATERIALX_LIBRARY_VERSION ${MATERIALX_MAJOR_VERSION}.${MATERIALX_MINOR_VERSI

# Cmake setup
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(CMAKE_MACOSX_RPATH ON)
enable_testing()
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ MaterialX is an open standard for representing rich material and look-developmen

### Supported Platforms

The MaterialX codebase requires a compiler with support for C++11, and can be built with any of the following:
The MaterialX codebase requires a compiler with support for C++14, and can be built with any of the following:

- Microsoft Visual Studio 2015 or newer
- GCC 4.8 or newer
- Clang 3.3 or newer
- Microsoft Visual Studio 2017 or newer
- GCC 6 or newer
- Clang 6 or newer

The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 2.7 and 3.x.

Expand Down
8 changes: 4 additions & 4 deletions documents/DeveloperGuide/MainPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ MaterialX is an open standard for transfer of rich material and look-development

### Supported Platforms

The MaterialX codebase requires a compiler with support for C++11, and can be built with any of the following:
The MaterialX codebase requires a compiler with support for C++14, and can be built with any of the following:

- Microsoft Visual Studio 2015 or newer
- GCC 4.8 or newer
- Clang 3.3 or newer
- Microsoft Visual Studio 2017 or newer
- GCC 6 or newer
- Clang 6 or newer

The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 2.7 and 3.x.

Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXCore/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Document::Cache

Document::Document(ElementPtr parent, const string& name) :
GraphElement(parent, CATEGORY, name),
_cache(std::unique_ptr<Cache>(new Cache))
_cache(std::make_unique<Cache>())
{
}

Expand Down
4 changes: 2 additions & 2 deletions source/MaterialXGenShader/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ MX_GENSHADER_API bool hasElementAttributes(OutputPtr output, const StringVec& at
// These are deprecated wrappers for older versions of the function interfaces in this module.
// Clients using these interfaces should update them to the latest API.
//
MX_GENSHADER_API void findRenderableMaterialNodes(ConstDocumentPtr doc, vector<TypedElementPtr>& elements, bool, std::unordered_set<ElementPtr>&);
MX_GENSHADER_API void findRenderableElements(ConstDocumentPtr doc, vector<TypedElementPtr>& elements, bool includeReferencedGraphs = false);
MX_GENSHADER_API [[deprecated]] void findRenderableMaterialNodes(ConstDocumentPtr doc, vector<TypedElementPtr>& elements, bool, std::unordered_set<ElementPtr>&);
MX_GENSHADER_API [[deprecated]] void findRenderableElements(ConstDocumentPtr doc, vector<TypedElementPtr>& elements, bool includeReferencedGraphs = false);

MATERIALX_NAMESPACE_END

Expand Down

0 comments on commit 7fa59fa

Please sign in to comment.