From 0df9cbc954c61fca0993b563c2686f9710978b08 Mon Sep 17 00:00:00 2001 From: Thierry Fauck Date: Mon, 25 Jul 2016 11:30:50 +0200 Subject: [PATCH] Non existent definition of _FPU_EXTENDED definition prevent compilation when WITH_CUDA set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non existence of _FPU_EXTENDED definition on powerpc64 (like it is for apple and arm) prevent compilation when WITH_CUDA is set. Adding powerpc64 as case to not use these definitions modifié: modules/cudalegacy/test/TestHaarCascadeApplication.cpp modifié: modules/cudalegacy/test/test_precomp.hpp Signed-off-by: Thierry Fauck --- modules/cudalegacy/test/TestHaarCascadeApplication.cpp | 9 ++++++--- modules/cudalegacy/test/test_precomp.hpp | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/cudalegacy/test/TestHaarCascadeApplication.cpp b/modules/cudalegacy/test/TestHaarCascadeApplication.cpp index b7c389e558..603f109c86 100644 --- a/modules/cudalegacy/test/TestHaarCascadeApplication.cpp +++ b/modules/cudalegacy/test/TestHaarCascadeApplication.cpp @@ -52,7 +52,8 @@ namespace ~FpuControl(); private: - #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) + #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && + !defined(__aarch64__) && !defined(__powerpc64__) fpu_control_t fpu_oldcw, fpu_cw; #elif defined(_WIN32) && !defined(_WIN64) unsigned int fpu_oldcw, fpu_cw; @@ -61,7 +62,8 @@ namespace FpuControl::FpuControl() { - #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) + #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && + !defined(__aarch64__) && !defined(__powerpc64__) _FPU_GETCW(fpu_oldcw); fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_DOUBLE & ~_FPU_SINGLE) | _FPU_SINGLE; _FPU_SETCW(fpu_cw); @@ -74,7 +76,8 @@ namespace FpuControl::~FpuControl() { - #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) + #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && + !defined(__aarch64__) && !defined(__powerpc64__) _FPU_SETCW(fpu_oldcw); #elif defined(_WIN32) && !defined(_WIN64) _controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC); diff --git a/modules/cudalegacy/test/test_precomp.hpp b/modules/cudalegacy/test/test_precomp.hpp index 41314da525..eeebb743f0 100644 --- a/modules/cudalegacy/test/test_precomp.hpp +++ b/modules/cudalegacy/test/test_precomp.hpp @@ -51,7 +51,8 @@ #ifndef __OPENCV_TEST_PRECOMP_HPP__ #define __OPENCV_TEST_PRECOMP_HPP__ -#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) +#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && + !defined(__aarch64__) && !defined(__powerpc64__) #include #endif