compilation under mac
This commit is contained in:
parent
8a47b3d5d5
commit
7d350280c0
@ -35,12 +35,12 @@ if (HAVE_CUDA)
|
||||
endif()
|
||||
|
||||
if (HAVE_CUDA)
|
||||
get_filename_component(_path_to_findnpp "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_path_to_findnpp})
|
||||
find_package(NPP 3.2.16 REQUIRED)
|
||||
message(STATUS "NPP detected: " ${NPP_VERSION})
|
||||
#get_filename_component(_path_to_findnpp "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
#set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_path_to_findnpp})
|
||||
#find_package(NPP 3.2.16 REQUIRED)
|
||||
#message(STATUS "NPP detected: " ${NPP_VERSION})
|
||||
|
||||
include_directories(${CUDA_INCLUDE_DIRS} ${CUDA_NPP_INCLUDES})
|
||||
include_directories(${CUDA_INCLUDE_DIRS})
|
||||
|
||||
if (UNIX OR APPLE)
|
||||
set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-fPIC;")
|
||||
@ -128,8 +128,12 @@ set_target_properties(${the_target} PROPERTIES
|
||||
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${DEPS} )
|
||||
|
||||
if (HAVE_CUDA)
|
||||
target_link_libraries(${the_target} ${CUDA_LIBRARIES} ${CUDA_NPP_LIBRARIES})
|
||||
target_link_libraries(${the_target} ${CUDA_LIBRARIES})
|
||||
CUDA_ADD_CUFFT_TO_TARGET(${the_target})
|
||||
|
||||
unset(CUDA_npp_LIBRARY CACHE)
|
||||
find_cuda_helper_libs(npp)
|
||||
target_link_libraries(${the_target} ${CUDA_npp_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
@ -575,7 +575,7 @@ typedef struct _NcvTimeMoment NcvTimeMoment;
|
||||
return 1000.0 * 2 * ((t2->moment) - (t1->moment)) / (t1->freq + t2->freq);
|
||||
}
|
||||
|
||||
#elif defined(__unix__)
|
||||
#elif defined(__GNUC__)
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) && !defined(__APPLE__)
|
||||
#include <fpu_control.h>
|
||||
#endif
|
||||
|
||||
@ -48,6 +48,9 @@ bool TestHaarCascadeApplication::init()
|
||||
|
||||
bool TestHaarCascadeApplication::process()
|
||||
{
|
||||
#if defined(__APPLE)
|
||||
return true;
|
||||
#endif
|
||||
NCVStatus ncvStat;
|
||||
bool rcode = false;
|
||||
|
||||
@ -200,6 +203,8 @@ bool TestHaarCascadeApplication::process()
|
||||
}
|
||||
ncvAssertReturn(cudaSuccess == cudaStreamSynchronize(0), false);
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
|
||||
#if defined(__GNUC__)
|
||||
//http://www.christian-seiler.de/projekte/fpmath/
|
||||
|
||||
@ -229,6 +234,8 @@ bool TestHaarCascadeApplication::process()
|
||||
searchRoiU, 1, 1.0f);
|
||||
ncvAssertReturn(ncvStat == NCV_SUCCESS, false);
|
||||
_controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
NCV_SKIP_COND_END
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user