Skip to content

Commit

Permalink
ci: override libuhdr c/c++ compiler in icx run to use gcc/g++
Browse files Browse the repository at this point in the history
Signed-off-by: loicvital <[email protected]>
  • Loading branch information
mugulmd committed Nov 6, 2024
1 parent cdf5c3d commit 3061eeb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ jobs:
simd: "avx2,f16c"
setenvs: export USE_OPENVDB=0
OPENCOLORIO_CXX=g++
UHDR_CMAKE_C_COMPILER=gcc
UHDR_CMAKE_CXX_COMPILER=g++
# OCIO doesn't build with icx, so we have to force the ocio build
# to use g++.
# Building libuhdr with icx results in test failures
# so we force using gcc/g++.
- desc: sanitizers
nametag: sanitizer
runner: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions src/cmake/build_libuhdr.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ if (TARGET libjpeg-turbo::jpeg)
get_target_property(JPEG_LIBRARY JPEG::JPEG INTERFACE_LINK_LIBRARIES)
endif ()

set_cache (UHDR_CMAKE_C_COMPILER ${CMAKE_C_COMPILER} "libuhdr build C compiler override" ADVANCED)
set_cache (UHDR_CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER} "libuhdr build C++ compiler override" ADVANCED)

build_dependency_with_cmake(libuhdr
VERSION ${libuhdr_BUILD_VERSION}
GIT_REPOSITORY ${libuhdr_GIT_REPOSITORY}
Expand All @@ -33,6 +36,8 @@ build_dependency_with_cmake(libuhdr
-D UHDR_ENABLE_LOGS=TRUE
-D JPEG_INCLUDE_DIR=${JPEG_INCLUDE_DIR}
-D JPEG_LIBRARY=${JPEG_LIBRARY}
-D CMAKE_C_COMPILER=${UHDR_CMAKE_C_COMPILER}
-D CMAKE_CXX_COMPILER=${UHDR_CMAKE_CXX_COMPILER}
)

if (WIN32)
Expand Down

0 comments on commit 3061eeb

Please sign in to comment.