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

Minor change for smooth build against upcoming Imath 3.0 #1341

Merged
merged 1 commit into from
Mar 1, 2021
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
2 changes: 1 addition & 1 deletion src/cmake/cuda_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function ( NVCC_COMPILE cuda_src ptx_generated extra_nvcc_args )
"-I${PROJECT_SOURCE_DIR}/src/include"
"-I${PROJECT_SOURCE_DIR}/src/cuda_common"
"-I${OpenImageIO_INCLUDES}"
"-I${ILMBASE_INCLUDES}"
"-I${IMATH_INCLUDES}"
"-I${Boost_INCLUDE_DIRS}"
"-DFMT_DEPRECATED=\"\""
${LLVM_COMPILE_FLAGS}
Expand Down
6 changes: 6 additions & 0 deletions src/cmake/externalpackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ checked_find_package (OpenEXR REQUIRED
"OpenEXR 2.2 is the oldest version our CI tests against, and the minimum that supports DWA compression"
PRINT IMATH_INCLUDES
)
# Force Imath includes to be before everything else to ensure that we have
# the right Imath/OpenEXR version, not some older version in the system
# library. This shoudn't be necessary, except for the common case of people
# building against Imath/OpenEXR 3.x when there is still a system-level
# install version of 2.x.
include_directories(BEFORE ${IMATH_INCLUDES})
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3)
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers
add_compile_options (-Wno-deprecated-register)
Expand Down
2 changes: 1 addition & 1 deletion src/liboslexec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ add_library (${local_lib} ${lib_src})
target_include_directories (${local_lib}
PUBLIC
${CMAKE_INSTALL_FULL_INCLUDEDIR}
${ILMBASE_INCLUDES}
${IMATH_INCLUDES}
PRIVATE
"${CMAKE_SOURCE_DIR}/src/liboslcomp"
)
Expand Down
4 changes: 2 additions & 2 deletions src/liboslquery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ add_library (${local_lib} ${lib_src})
target_include_directories (${local_lib}
PUBLIC
${CMAKE_INSTALL_FULL_INCLUDEDIR}
${ILMBASE_INCLUDES}
PRIVATE
# ${IMATH_INCLUDES}
../liboslexec)
target_link_libraries (${local_lib}
PUBLIC
OpenImageIO::OpenImageIO
${ILMBASE_LIBRARIES}
PRIVATE
# ${IMATH_LIBRARIES}
${Boost_LIBRARIES}
)

Expand Down
4 changes: 2 additions & 2 deletions testsuite/example-cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cuda_compile_ptx(CUDA_PTX_FILES cuda_grid_renderer.cu
OPTIONS --gpu-architecture=${CUDA_TARGET_ARCH} --use_fast_math -dc --std=c++11
--expt-relaxed-constexpr
-I${OSL_INCLUDES}
-I${ILMBASE_INCLUDES}
-I${IMATH_INCLUDES}
-I${OpenImageIO_INCLUDES}
-I${OPTIX_INCLUDES}
)
Expand All @@ -61,7 +61,7 @@ cuda_compile_ptx(CUDA_PTX_FILES rend_lib.cu
OPTIONS --gpu-architecture=${CUDA_TARGET_ARCH} --use_fast_math -dc --std=c++14
--expt-relaxed-constexpr
-I${OSL_INCLUDES}
-I${ILMBASE_INCLUDES}
-I${IMATH_INCLUDES}
-I${OpenImageIO_INCLUDES}
-I${OPTIX_INCLUDES}
)
Expand Down