[x265] [PATCH] Fix compilation with Visual Studio 2013

Jan Ekström jeebjp at gmail.com
Wed Oct 23 14:48:56 CEST 2013


# HG changeset patch
# User Jan Ekström <jeebjp at gmail.com>
# Date 1382531113 -10800
#      Wed Oct 23 15:25:13 2013 +0300
# Node ID 8dff80805f790c70e89890ba0d20643b93b2a5ed
# Parent  6d96d64c4e9a2c526b57274760a7147241328cb3
Fix compilation with Visual Studio 2013

The <algorithm> header is needed for std::min and friends,
and the CMakeLists.txt modification makes the version check
match what is used in the source code.

Unfortunately cmake does not seem to contain a GREATER_OR_EQUAL
macro, so NOT(LESS) has to be used.

diff -r 6d96d64c4e9a -r 8dff80805f79 source/Lib/TLibCommon/TComRom.h
--- a/source/Lib/TLibCommon/TComRom.h	Tue Oct 22 23:36:36 2013 +0530
+++ b/source/Lib/TLibCommon/TComRom.h	Wed Oct 23 15:25:13 2013 +0300
@@ -42,6 +42,7 @@
 
 #include <stdio.h>
 #include <iostream>
+#include <algorithm>
 
 namespace x265 {
 // private namespace
diff -r 6d96d64c4e9a -r 8dff80805f79 source/common/CMakeLists.txt
--- a/source/common/CMakeLists.txt	Tue Oct 22 23:36:36 2013 +0530
+++ b/source/common/CMakeLists.txt	Wed Oct 23 15:25:13 2013 +0300
@@ -97,7 +97,7 @@
                 vec/intra-ssse3.cpp vec/intra-sse41.cpp vec/pixel16-sse41.cpp
                 PROPERTIES COMPILE_FLAGS /arch:SSE2)
         endif()
-        if (MSVC_VERSION EQUAL 1700 OR INTEL_CXX)
+        if (NOT (MSVC_VERSION LESS 1700) OR INTEL_CXX)
             set(PRIMITIVES ${PRIMITIVES} vec/blockcopy-avx2.cpp vec/pixel-avx2.cpp)
             set_source_files_properties(vec/blockcopy-avx2.cpp vec/pixel-avx2.cpp
                 PROPERTIES COMPILE_FLAGS /arch:AVX)


More information about the x265-devel mailing list