Commit: f5b46daf521677d85f2533de7ffd4280dd50d163
Author: Brecht Van Lommel
Date:   Wed Dec 5 12:53:08 2018 +0100
Branches: master
https://developer.blender.org/rBf5b46daf521677d85f2533de7ffd4280dd50d163

Fix build with old CMake versions.

===================================================================

M       intern/cycles/CMakeLists.txt
M       intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 8f0d838e881..6fe4546ae8c 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -308,7 +308,7 @@ if(WITH_CYCLES_CUDA_BINARIES AND (NOT 
WITH_CYCLES_CUBIN_COMPILER))
                endif()
                unset(MAX_MSVC)
        elseif(APPLE)
-               if(${XCODE_VERSION} VERSION_GREATER_EQUAL 10.0)
+               if(NOT (${XCODE_VERSION} VERSION_LESS 10.0))
                        message(STATUS "nvcc not supported for this compiler 
version, using cycles_cubin_cc instead.")
                        set(WITH_CYCLES_CUBIN_COMPILER ON)
                endif()
@@ -317,7 +317,7 @@ endif()
 
 # NVRTC gives wrong rendering result in CUDA 10.0, so we must use NVCC.
 if(WITH_CYCLES_CUDA_BINARIES AND WITH_CYCLES_CUBIN_COMPILER)
-       if(${CUDA_VERSION} VERSION_GREATER_EQUAL 10.0)
+       if(NOT (${CUDA_VERSION} VERSION_LESS 10.0))
                message(STATUS "cycles_cubin_cc not supported for CUDA 10.0+, 
using nvcc instead.")
                set(WITH_CYCLES_CUBIN_COMPILER OFF)
        endif()
diff --git a/intern/cycles/kernel/CMakeLists.txt 
b/intern/cycles/kernel/CMakeLists.txt
index 73ff7aeda15..78e03a7f066 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -454,7 +454,7 @@ if(WITH_CYCLES_CUDA_BINARIES)
        foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
                if(${arch} MATCHES "sm_2.")
                        message(STATUS "CUDA binaries for ${arch} are no longer 
supported, skipped.")
-               elseif(${arch} MATCHES "sm_7." AND NOT (${CUDA_VERSION} 
VERSION_GREATER_EQUAL 10.0))
+               elseif(${arch} MATCHES "sm_7." AND (${CUDA_VERSION} 
VERSION_LESS 10.0))
                        message(STATUS "CUDA binaries for ${arch} require CUDA 
10.0+, skipped.")
                else()
                        # Compile regular kernel

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to