Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GCC 14 #1913

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
python: 3.11
build_javascript: ON

- name: Linux_GCC_13_Python312
- name: Linux_GCC_14_Python312
os: ubuntu-24.04
compiler: gcc
compiler_version: "13"
compiler_version: "14"
python: 3.12
static_analysis: ON
cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
Expand Down
7 changes: 2 additions & 5 deletions source/MaterialXCore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Generated.h.in ${CMAKE_CURRENT_BINARY_DIR}/Generated.h)

file(GLOB materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
Expand All @@ -10,11 +9,9 @@ mx_add_library(MaterialXCore
HEADER_FILES
${materialx_headers}
EXPORT_DEFINE
MATERIALX_CORE_EXPORTS
)
MATERIALX_CORE_EXPORTS)

# Need to add the binary directory to find the Generated.h file generated above.
target_include_directories(${TARGET_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../>
)
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../>)
4 changes: 1 addition & 3 deletions source/MaterialXFormat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -10,5 +9,4 @@ mx_add_library(MaterialXFormat
LIBRARIES
MaterialXCore
EXPORT_DEFINE
MATERIALX_FORMAT_EXPORTS
)
MATERIALX_FORMAT_EXPORTS)
4 changes: 1 addition & 3 deletions source/MaterialXGenGlsl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -11,5 +10,4 @@ mx_add_library(MaterialXGenGlsl
MaterialXGenShader
MaterialXCore
EXPORT_DEFINE
MATERIALX_GENGLSL_EXPORTS
)
MATERIALX_GENGLSL_EXPORTS)
5 changes: 1 addition & 4 deletions source/MaterialXGenMdl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -11,6 +10,4 @@ mx_add_library(MaterialXGenMdl
MaterialXGenShader
MaterialXCore
EXPORT_DEFINE
MATERIALX_GENMDL_EXPORTS
)

MATERIALX_GENMDL_EXPORTS)
4 changes: 1 addition & 3 deletions source/MaterialXGenMsl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -11,5 +10,4 @@ mx_add_library(MaterialXGenMsl
MaterialXGenShader
MaterialXCore
EXPORT_DEFINE
MATERIALX_GENMSL_EXPORTS
)
MATERIALX_GENMSL_EXPORTS)
4 changes: 1 addition & 3 deletions source/MaterialXGenOsl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -11,5 +10,4 @@ mx_add_library(MaterialXGenOsl
MaterialXGenShader
MaterialXCore
EXPORT_DEFINE
MATERIALX_GENOSL_EXPORTS
)
MATERIALX_GENOSL_EXPORTS)
4 changes: 1 addition & 3 deletions source/MaterialXGenShader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -11,5 +10,4 @@ mx_add_library(MaterialXGenShader
MaterialXFormat
MaterialXCore
EXPORT_DEFINE
MATERIALX_GENSHADER_EXPORTS
)
MATERIALX_GENSHADER_EXPORTS)
4 changes: 2 additions & 2 deletions source/MaterialXGraphEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ set(MATERIALX_LIBRARIES
MaterialXGenGlsl
MaterialXRenderGlsl)

if (APPLE)
if(APPLE)
find_library(CORE_FOUNDATION Foundation REQUIRED)
list(APPEND MATERIALX_LIBRARIES ${CORE_FOUNDATION})
endif ()
endif()

target_link_libraries(
MaterialXGraphEditor
Expand Down
7 changes: 4 additions & 3 deletions source/MaterialXRender/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_inlined "${CMAKE_CURRENT_SOURCE_DIR}/*.inl")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")
Expand All @@ -15,11 +14,13 @@ mx_add_library(MaterialXRender
LIBRARIES
MaterialXGenShader
EXPORT_DEFINE
MATERIALX_RENDER_EXPORTS
)
MATERIALX_RENDER_EXPORTS)

if(UNIX)
target_compile_options(${TARGET_NAME} PRIVATE -Wno-unused-function)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(${TARGET_NAME} PRIVATE -Wno-stringop-overflow)
endif()
endif()

if(MATERIALX_BUILD_OIIO)
Expand Down
6 changes: 1 addition & 5 deletions source/MaterialXRenderGlsl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.c*")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -24,7 +23,6 @@ elseif(UNIX)
find_package(OpenGL REQUIRED)
endif()


mx_add_library(MaterialXRenderGlsl
SOURCE_FILES
${materialx_source}
Expand All @@ -35,9 +33,7 @@ mx_add_library(MaterialXRenderGlsl
MaterialXGenGlsl
EXPORT_DEFINE
MATERIALX_RENDERGLSL_EXPORTS
ADD_OBJECTIVE_C_CODE
)

ADD_OBJECTIVE_C_CODE)

if(APPLE)
target_compile_definitions(${TARGET_NAME} PRIVATE -DGL_SILENCE_DEPRECATION)
Expand Down
4 changes: 1 addition & 3 deletions source/MaterialXRenderHw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ elseif(UNIX)
endif()
endif()


mx_add_library(MaterialXRenderHw
SOURCE_FILES
${materialx_source}
Expand All @@ -25,8 +24,7 @@ mx_add_library(MaterialXRenderHw
MaterialXRender
EXPORT_DEFINE
MATERIALX_RENDERHW_EXPORTS
ADD_OBJECTIVE_C_CODE
)
ADD_OBJECTIVE_C_CODE)

if(APPLE)
target_link_libraries(
Expand Down
6 changes: 1 addition & 5 deletions source/MaterialXRenderMsl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.m*")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -22,7 +21,6 @@ elseif(UNIX)
find_package(OpenGL REQUIRED)
endif()


mx_add_library(MaterialXRenderMsl
SOURCE_FILES
${materialx_source}
Expand All @@ -33,9 +31,7 @@ mx_add_library(MaterialXRenderMsl
MaterialXGenMsl
EXPORT_DEFINE
MATERIALX_RENDERMSL_EXPORTS
ADD_OBJECTIVE_C_CODE
)

ADD_OBJECTIVE_C_CODE)

if(APPLE)
target_compile_definitions(${TARGET_NAME} PRIVATE -DGL_SILENCE_DEPRECATION)
Expand Down
4 changes: 1 addition & 3 deletions source/MaterialXRenderOsl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")

Expand All @@ -10,5 +9,4 @@ mx_add_library(MaterialXRenderOsl
LIBRARIES
MaterialXRender
EXPORT_DEFINE
MATERIALX_RENDEROSL_EXPORTS
)
MATERIALX_RENDEROSL_EXPORTS)
2 changes: 1 addition & 1 deletion source/MaterialXView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-deprecated)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options(-Wno-format-truncation -Wno-use-after-free)
add_compile_options(-Wno-format-truncation -Wno-stringop-overflow -Wno-use-after-free)
endif()

# Disable NanoGUI compiler modifications for Clang
Expand Down
3 changes: 1 addition & 2 deletions source/PyMaterialX/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
include_directories(
${EXTERNAL_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_SOURCE_DIR}
)
${CMAKE_CURRENT_SOURCE_DIR})

# Apply Python version and location requests from the user.
set(PYBIND11_PYTHON_VERSION ${MATERIALX_PYTHON_VERSION})
Expand Down