Split out from #138161. I checked with a locally built OSL (on Linux), and all tests (incl. OptiX OSL) still pass without the Cycles-side changes in that PR, so we can merge this and update the libs separately. The only file that needs to be updated in the deps is `liboslexec.so`, and probably `llvm/lib/clang/17/include/__clang_cuda_device_functions.h` (we don't use this when building Blender, but since it's changed, it's probably cleaner to update it anyways). Pull Request: https://projects.blender.org/blender/blender/pulls/138788
44 lines
1.6 KiB
CMake
44 lines
1.6 KiB
CMake
# SPDX-FileCopyrightText: 2019-2023 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Check against installed versions.
|
|
|
|
message(STATUS "Found C Compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
|
|
if(UNIX AND NOT APPLE)
|
|
if(NOT CMAKE_COMPILER_IS_GNUCC OR NOT (CMAKE_C_COMPILER_VERSION MATCHES "${RELEASE_GCC_VERSION}.*"))
|
|
message(STATUS " NOTE: Official releases uses GCC ${RELEASE_GCC_VERSION}")
|
|
endif()
|
|
endif()
|
|
|
|
message(STATUS "Found C++ Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
|
if(UNIX AND NOT APPLE)
|
|
if(NOT CMAKE_COMPILER_IS_GNUCC OR NOT (CMAKE_CXX_COMPILER_VERSION MATCHES "${RELEASE_GCC_VERSION}.*"))
|
|
message(STATUS " NOTE: Official releases uses GCC ${RELEASE_GCC_VERSION}")
|
|
endif()
|
|
endif()
|
|
|
|
if(NOT APPLE)
|
|
find_package(CUDAToolkit)
|
|
if(NOT CUDAToolkit_NVCC_EXECUTABLE)
|
|
message(STATUS "Missing CUDA compiler")
|
|
else()
|
|
message(STATUS "Found CUDA Compiler: ${CUDAToolkit_NVCC_EXECUTABLE} ${CUDAToolkit_VERSION}")
|
|
if(NOT CUDAToolkit_VERSION MATCHES "${RELEASE_CUDA_VERSION}.*")
|
|
message(STATUS " NOTE: Official releases uses CUDA ${RELEASE_CUDA_VERSION}")
|
|
endif()
|
|
get_filename_component(CUDAToolkit_ROOT ${CUDAToolkit_BIN_DIR} DIRECTORY ABSOLUTE)
|
|
endif()
|
|
|
|
unset(HIP_VERSION)
|
|
find_package(HIP QUIET)
|
|
if(NOT HIP_FOUND)
|
|
message(STATUS "Missing HIP compiler")
|
|
else()
|
|
message(STATUS "Found HIP Compiler: ${HIP_HIPCC_EXECUTABLE} ${HIP_VERSION}")
|
|
if(NOT HIP_VERSION MATCHES "${RELEASE_HIP_VERSION}.*")
|
|
message(STATUS " NOTE: Official releases uses HIP ${RELEASE_HIP_VERSION}")
|
|
endif()
|
|
endif()
|
|
endif()
|