Skip to content

Commit

Permalink
Adsk Contrib - Default to C++14 and remove OIIO from ocioperf (#1516)
Browse files Browse the repository at this point in the history
* Adsk Contrib - Default to C++14 and remove OIIO from ocioperf

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Fix cmake breaks

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Fix bit-depths

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Fix Linux build break

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Improve the image generation

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Improve the image generation

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
  • Loading branch information
hodoulp authored Nov 23, 2021
1 parent 64dccad commit 5dc9c51
Show file tree
Hide file tree
Showing 8 changed files with 281 additions and 280 deletions.
47 changes: 30 additions & 17 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
image: aswf/ci-ocio:${{ matrix.vfx-cy }}
strategy:
matrix:
build: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
build: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
include:
# -------------------------------------------------------------------
# VFX CY2022 (Python 3.9)
# -------------------------------------------------------------------
# Clang, Debug, OpenFX
- build: 12
- build: 13
build-type: Debug
build-shared: 'ON'
build-docs: 'OFF'
Expand All @@ -78,7 +78,7 @@ jobs:
compiler-desc: Clang 9
vfx-cy: 2022
# GCC, no SSE, OpenFX
- build: 11
- build: 12
build-type: Release
build-shared: 'ON'
build-docs: 'OFF'
Expand All @@ -90,15 +90,28 @@ jobs:
cc-compiler: gcc
compiler-desc: GCC 9.3.1
vfx-cy: 2022
# GCC, static, docs
- build: 10
# C++14, GCC, static, docs
- build: 11
build-type: Release
build-shared: 'OFF'
build-docs: 'ON'
build-openfx: 'OFF'
use-sse: 'ON'
use-openexr-half: 'OFF'
cxx-standard: 17
cxx-standard: 14
cxx-compiler: g++
cc-compiler: gcc
compiler-desc: GCC 9.3.1
vfx-cy: 2022
# C++11, GCC, static
- build: 10
build-type: Release
build-shared: 'OFF'
build-docs: 'OFF'
build-openfx: 'OFF'
use-sse: 'ON'
use-openexr-half: 'OFF'
cxx-standard: 11
cxx-compiler: g++
cc-compiler: gcc
compiler-desc: GCC 9.3.1
Expand All @@ -119,36 +132,36 @@ jobs:
cc-compiler: clang
compiler-desc: Clang 9
vfx-cy: 2021
# Clang, static, no SSE, OpenFX
# C++14, Clang, static, no SSE, OpenFX
- build: 8
build-type: Release
build-shared: 'OFF'
build-docs: 'OFF'
build-openfx: 'ON'
use-sse: 'OFF'
use-openexr-half: 'ON'
cxx-standard: 17
cxx-standard: 14
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang 9
vfx-cy: 2021
# GCC, Debug
# C++11, GCC, Debug
- build: 7
build-type: Debug
build-shared: 'ON'
build-docs: 'OFF'
build-openfx: 'OFF'
use-sse: 'ON'
use-openexr-half: 'ON'
cxx-standard: 17
cxx-standard: 11
cxx-compiler: g++
cc-compiler: gcc
compiler-desc: GCC 9.3.1
vfx-cy: 2021
# -------------------------------------------------------------------
# VFX CY2020 (Python 3.7)
# -------------------------------------------------------------------
# Clang, OpenFX
# C++14, Clang, OpenFX
- build: 6
build-type: Release
build-shared: 'ON'
Expand All @@ -161,7 +174,7 @@ jobs:
cc-compiler: clang
compiler-desc: Clang 7
vfx-cy: 2020
# GCC, static, Debug, OpenFX
# C++14, GCC, static, Debug, OpenFX
- build: 5
build-type: Debug
build-shared: 'OFF'
Expand All @@ -174,23 +187,23 @@ jobs:
cc-compiler: gcc
compiler-desc: GCC 6.3.1
vfx-cy: 2020
# GCC, no SSE, docs
# C++11, GCC, no SSE, docs
- build: 4
build-type: Release
build-shared: 'ON'
build-docs: 'ON'
build-openfx: 'OFF'
use-sse: 'ON'
use-openexr-half: 'ON'
cxx-standard: 14
cxx-standard: 11
cxx-compiler: g++
cc-compiler: gcc
compiler-desc: GCC 6.3.1
vfx-cy: 2020
# -------------------------------------------------------------------
# VFX CY2019 (Python 2.7)
# -------------------------------------------------------------------
# Clang, static
# C++11, Clang, static
- build: 3
build-type: Release
build-shared: 'OFF'
Expand All @@ -204,7 +217,7 @@ jobs:
cc-compiler: clang
compiler-desc: Clang 7
vfx-cy: 2019
# Clang, Debug, no SSE
# C++11, Clang, Debug, no SSE
- build: 2
build-type: Debug
build-shared: 'ON'
Expand All @@ -218,7 +231,7 @@ jobs:
cc-compiler: clang
compiler-desc: Clang 7
vfx-cy: 2019
# GCC, OpenFX
# C++11, GCC, OpenFX
- build: 1
build-type: Release
build-shared: 'ON'
Expand Down
10 changes: 10 additions & 0 deletions share/cmake/modules/FindOpenShadingLanguage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ else()

endif()

###############################################################################
### Check the C++ version ###

# TODO: Which version starts to impose C++14?

if(${CMAKE_CXX_STANDARD} LESS_EQUAL 11)
set(OSL_FOUND OFF)
message(WARNING "Need C++14 or higher to compile OpenShadingLanguage. Skipping build of the OSL unit tests")
endif()

###############################################################################
### Configure target ###

Expand Down
4 changes: 2 additions & 2 deletions share/cmake/utils/CppVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set(SUPPORTED_CXX_STANDARDS 11 14 17)
string(REPLACE ";" ", " SUPPORTED_CXX_STANDARDS_STR "${SUPPORTED_CXX_STANDARDS}")

if(NOT DEFINED CMAKE_CXX_STANDARD)
message(STATUS "Setting C++ version to '11' as none was specified.")
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to compile against")
message(STATUS "Setting C++ version to '14' as none was specified.")
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to compile against")
elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS)
message(FATAL_ERROR
"CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.")
Expand Down
2 changes: 1 addition & 1 deletion src/OpenColorIO/ColorSpaceSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ColorSpaceSet::Impl
return *this;
}

bool operator== (const Impl & rhs)
bool operator== (const Impl & rhs) const
{
if (this == &rhs) return true;

Expand Down
4 changes: 2 additions & 2 deletions src/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ if(OCIO_BUILD_APPS)
add_subdirectory(ociocheck)
add_subdirectory(ociochecklut)
add_subdirectory(ociomakeclf)
add_subdirectory(ocioperf)
add_subdirectory(ociowrite)

if(OpenImageIO_FOUND AND TARGET OpenImageIO::OpenImageIO)
add_subdirectory(ociolutimage)
add_subdirectory(ocioconvert)
add_subdirectory(ociodisplay)
add_subdirectory(ocioperf)
else()
message(WARNING "Could NOT find OpenImageIO. Skipping build for ociolutimage, ocioconvert, ociodisplay and ocioperf")
message(WARNING "Could NOT find OpenImageIO. Skipping build for ociolutimage, ocioconvert and ociodisplay")
endif()
endif()
2 changes: 0 additions & 2 deletions src/apps/ocioperf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ set_target_properties(ocioperf PROPERTIES
target_link_libraries(ocioperf
PRIVATE
apputils
oiiohelpers
OpenColorIO
OpenImageIO::OpenImageIO
utils::strings
)

Expand Down
Loading

0 comments on commit 5dc9c51

Please sign in to comment.