Fix build with old CMake versions.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 5 Dec 2018 11:53:08 +0000 (12:53 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 5 Dec 2018 11:53:19 +0000 (12:53 +0100)
intern/cycles/CMakeLists.txt
intern/cycles/kernel/CMakeLists.txt

index 8f0d838e881aa910af49c08b3d3d03f2f96f053f..6fe4546ae8c860d0116ad56f547f47c7a2aeeab8 100644 (file)
@@ -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()
index 73ff7aeda154a5a7fcfac194ef6830121c8f6f4e..78e03a7f066bf4aaace4e67e65cf9ce99be4f802 100644 (file)
@@ -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