Skip to content

Commit

Permalink
Fix compilation warnings on macOS (#1826)
Browse files Browse the repository at this point in the history
* fix compilation warnings on macOS

* hide procedural symbols when compiling with the static monolithic usd lib
  • Loading branch information
cpichard authored Jan 25, 2024
1 parent 8ec123e commit ea4d801
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/common/materials_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ AtNode* ReadShader(const std::string& nodeName, const TfToken& shaderId,

#if ARNOLD_VERSION_NUM > 70203
std::string shaderKey = shaderId.GetString();
shaderKey += pxrMtlxPath.empty() ? "" : std::string(pxrMtlxPath.c_str());
shaderKey += std::string(pxrMtlxPath.empty() ? "" : std::string(pxrMtlxPath.c_str()));
const AtNodeEntry* shaderNodeEntry = context.GetCachedMtlxNodeEntry(shaderKey, shaderId.GetText(), params);
#else
// arnold backwards compatibility. We used to rely on the nodedef prefix to identify
Expand Down
2 changes: 1 addition & 1 deletion libs/translator/reader/read_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MaterialUsdReader : public MaterialReader
_reader(context.GetReader()),
MaterialReader() {}

AtNode* CreateArnoldNode(const char* nodeType, const char* nodeName)
AtNode* CreateArnoldNode(const char* nodeType, const char* nodeName) override
{
return _context.CreateArnoldNode(nodeType, nodeName);
}
Expand Down
6 changes: 2 additions & 4 deletions plugins/procedural/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ endif ()
if (LINUX)
target_compile_options(${PROC_NAME} PRIVATE -fvisibility=hidden)
elseif (APPLE)
if (${ARNOLD_VERSION} VERSION_GREATER_EQUAL "6.0.3.0")
if (BUILD_WITH_USD_STATIC)
if (BUILD_WITH_USD_STATIC)
if (${ARNOLD_VERSION} VERSION_GREATER_EQUAL "6.0.3.0")
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Xlinker -S -Xlinker -x -Xlinker -exported_symbols_list -Xlinker ${CMAKE_CURRENT_SOURCE_DIR}/macos_export_list")
else ()
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Xlinker -S -Xlinker -x -Xlinker -exported_symbols_list -Xlinker ${CMAKE_CURRENT_SOURCE_DIR}/macos_export_list_shared")
endif ()
else ()
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Xlinker -S -Xlinker -x -Xlinker -exported_symbols_list -Xlinker ${CMAKE_CURRENT_SOURCE_DIR}/macos_export_list_no_scene")
Expand Down

0 comments on commit ea4d801

Please sign in to comment.