Skip to content

Commit

Permalink
Bazel support: Switch to Imath 3.1.12 (#1856)
Browse files Browse the repository at this point in the history
Signed-off-by: Vertexwahn <[email protected]>
  • Loading branch information
Vertexwahn authored Oct 2, 2024
1 parent 8d52f35 commit 0a0bb45
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 81 deletions.
12 changes: 12 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Contributors to the OpenEXR Project.

common --enable_platform_specific_config

# Enable modern C++ features
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:macos --host_cxxopt=-std=c++17
build:windows --cxxopt=/std:c++17
build:windows --host_cxxopt=/std:c++17
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.1
7.3.1
86 changes: 8 additions & 78 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ expand_template(
name = "IexConfig",
out = "src/lib/Iex/IexConfig.h",
substitutions = {
"@IEX_INTERNAL_NAMESPACE@": "Iex_3_2",
"@IEX_INTERNAL_NAMESPACE@": "Iex_3_3",
"@IEX_NAMESPACE_CUSTOM@": "0",
"@IEX_NAMESPACE@": "Iex",
},
Expand All @@ -34,7 +34,7 @@ expand_template(
name = "IlmThreadConfig",
out = "src/lib/IlmThread/IlmThreadConfig.h",
substitutions = {
"@ILMTHREAD_INTERNAL_NAMESPACE@": "IlmThread_3_2",
"@ILMTHREAD_INTERNAL_NAMESPACE@": "IlmThread_3_3",
"@ILMTHREAD_NAMESPACE_CUSTOM@": "0",
"@ILMTHREAD_NAMESPACE@": "IlmThread",
"#cmakedefine01 ILMTHREAD_HAVE_POSIX_SEMAPHORES": "#define ILMTHREAD_HAVE_POSIX_SEMAPHORES 0",
Expand All @@ -48,14 +48,14 @@ expand_template(
out = "src/lib/OpenEXR/OpenEXRConfig.h",
substitutions = {
"@OPENEXR_IMF_NAMESPACE@": "Imf",
"@OPENEXR_INTERNAL_IMF_NAMESPACE@": "Imf_3_2",
"@OPENEXR_LIB_VERSION@": "3.2.0",
"@OPENEXR_NAMESPACE_CUSTOM@": "3.2.0",
"@OPENEXR_PACKAGE_NAME@": "OpenEXR 3.2.0",
"@OPENEXR_INTERNAL_IMF_NAMESPACE@": "Imf_3_3",
"@OPENEXR_LIB_VERSION@": "3.3.0",
"@OPENEXR_NAMESPACE_CUSTOM@": "3.3.0",
"@OPENEXR_PACKAGE_NAME@": "OpenEXR 3.3.0",
"@OPENEXR_VERSION_EXTRA@": "",
"@OPENEXR_VERSION@": "3.2.0",
"@OPENEXR_VERSION@": "3.3.0",
"@OPENEXR_VERSION_MAJOR@": "3",
"@OPENEXR_VERSION_MINOR@": "2",
"@OPENEXR_VERSION_MINOR@": "3",
"@OPENEXR_VERSION_PATCH@": "0",
"#cmakedefine OPENEXR_ENABLE_API_VISIBILITY": "#define OPENEXR_ENABLE_API_VISIBILITY",
"#cmakedefine OPENEXR_HAVE_LARGE_STACK 1": "/* #undef OPENEXR_HAVE_LARGE_STACK */",
Expand Down Expand Up @@ -103,14 +103,6 @@ cc_library(
"src/lib/Iex/IexThrowErrnoExc.h",
"src/lib/OpenEXR/OpenEXRConfig.h",
],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
],
}),
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
Expand Down Expand Up @@ -146,14 +138,6 @@ cc_library(
"src/lib/IlmThread/IlmThreadProcessGroup.h",
"src/lib/IlmThread/IlmThreadSemaphore.h",
],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
],
}),
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
Expand Down Expand Up @@ -499,15 +483,6 @@ cc_library(
"src/lib/OpenEXR/OpenEXRConfig.h",
"src/lib/OpenEXR/OpenEXRConfigInternal.h",
],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
"-Wno-error",
],
}),
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
Expand Down Expand Up @@ -538,15 +513,6 @@ cc_test(
"src/test/IexTest/testBaseExc.cpp",
"src/test/IexTest/testBaseExc.h",
],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
"-Wno-error",
],
}),
includes = ["src/test/IexTest"],
tags = ["manual"], # This test is not build and executed in the CI
deps = [
Expand All @@ -557,15 +523,6 @@ cc_test(
cc_binary(
name = "exr2aces",
srcs = ["src/bin/exr2aces/main.cpp"],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
"-Wno-error",
],
}),
deps = [
":OpenEXR",
],
Expand All @@ -574,15 +531,6 @@ cc_binary(
cc_binary(
name = "exrheader",
srcs = ["src/bin/exrheader/main.cpp"],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
"-Wno-error",
],
}),
deps = [
":OpenEXR",
],
Expand All @@ -599,15 +547,6 @@ cc_binary(
"src/bin/exrenvmap/readInputImage.cpp",
"src/bin/exrenvmap/resizeImage.cpp",
] + glob(["src/bin/exrenvmap/*.h"]),
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
"-Wno-error",
],
}),
includes = [
"src/bin/exrenvmap",
],
Expand All @@ -619,15 +558,6 @@ cc_binary(
cc_binary(
name = "exrstdattr",
srcs = ["src/bin/exrstdattr/main.cpp"],
copts = select({
":windows": [
"/std:c++17",
],
"//conditions:default": [
"--std=c++17",
"-Wno-error",
],
}),
deps = [
":OpenEXR",
],
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "imath", version = "3.1.11")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "imath", version = "3.1.12")
bazel_dep(name = "libdeflate", version = "1.21")
bazel_dep(name = "platforms", version = "0.0.10")

0 comments on commit 0a0bb45

Please sign in to comment.