Try to fix build

This commit is contained in:
Benau 2017-03-13 12:12:51 +08:00
parent a1492981cf
commit ab10702d12
3 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
if (UNIX OR MINGW) if (UNIX OR MINGW)
add_definitions(-O3 -msse -msse2 -msse3 -mssse3 -msse4.1 -mavx -ffast-math) add_definitions(-O3)
endif() endif()
add_library(graphics_utils STATIC add_library(graphics_utils STATIC
mipmap/cpusimd.c mipmap/cpusimd.c

View File

@ -41,12 +41,15 @@
#include <float.h> #include <float.h>
#include <limits.h> #include <limits.h>
#include <sys/time.h>
#include "cpusimd.h" #include "cpusimd.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
//// ////

View File

@ -58,7 +58,11 @@
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__) #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
#define CC_ALWAYSINLINE __attribute__((always_inline)) #define CC_ALWAYSINLINE __attribute__((always_inline))
#define CC_RESTRICT restrict #if __STDC_VERSION__ >= 199901L
#define CC_RESTRICT restrict
#else
#define CC_RESTRICT
#endif
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#define CC_ALWAYSINLINE __forceinline #define CC_ALWAYSINLINE __forceinline
#define CC_RESTRICT __restrict #define CC_RESTRICT __restrict