File tree Expand file tree Collapse file tree 3 files changed +32
-20
lines changed Expand file tree Collapse file tree 3 files changed +32
-20
lines changed Original file line number Diff line number Diff line change @@ -8,28 +8,14 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4189 /wd4505 -Wundef -Wmissing-declarati
8
8
9
9
ocv_add_module(cudev)
10
10
11
- file (GLOB_RECURSE lib_hdrs "include/opencv2/*.hpp" )
12
-
13
- add_custom_target (${the_module} SOURCES ${lib_hdrs} )
14
-
15
- if (ENABLE_SOLUTION_FOLDERS)
16
- set_target_properties (${the_module} PROPERTIES FOLDER "modules" )
17
- endif ()
18
-
19
- foreach (var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG )
20
- # we remove /EHa as it generates warnings under windows
21
- string (REPLACE "/EHa" "" ${var} "${${var} }" )
11
+ ocv_module_include_directories(opencv_core)
22
12
23
- # we remove -ggdb3 flag as it leads to preprocessor errors when compiling CUDA files (CUDA 4.1 )
24
- string (REPLACE "-ggdb3" "" ${var} "${ ${var} } " )
13
+ file (GLOB_RECURSE lib_hdrs "include/opencv2/*.hpp" )
14
+ file (GLOB lib_srcs "src/*.cpp " )
25
15
26
- # we remove -Wsign-promo as it generates warnings under linux
27
- string (REPLACE "-Wsign-promo" "" ${var} "${${var} }" )
16
+ ocv_set_module_sources(HEADERS ${lib_hdrs} SOURCES ${lib_srcs} )
28
17
29
- # we remove -fvisibility-inlines-hidden because it's used for C++ compiler
30
- # but NVCC uses C compiler by default
31
- string (REPLACE "-fvisibility-inlines-hidden" "" ${var} "${${var} }" )
32
- endforeach ()
18
+ ocv_create_module()
33
19
34
20
if (BUILD_TESTS)
35
21
add_subdirectory (test )
Original file line number Diff line number Diff line change
1
+ #include < opencv2/core/cvdef.h>
2
+
3
+ namespace cv { namespace cudev {
4
+
5
+ CV_EXPORTS void stubFunc ();
6
+
7
+ }}
8
+
9
+ void cv::cudev::stubFunc ()
10
+ {
11
+ }
Original file line number Diff line number Diff line change 1
- set (test_deps opencv_core opencv_imgproc opencv_highgui opencv_ts ${OPENCV_MODULE_opencv_ts_DEPS} )
1
+ set (test_deps opencv_cudev opencv_core opencv_imgproc opencv_highgui opencv_ts ${OPENCV_MODULE_opencv_ts_DEPS} )
2
2
3
3
ocv_check_dependencies(${test_deps} )
4
4
@@ -13,6 +13,21 @@ if(OCV_DEPENDENCIES_FOUND)
13
13
source_group ("Include" FILES ${test_hdrs} )
14
14
set (OPENCV_TEST_${the_module} _SOURCES ${test_srcs} ${test_hdrs} )
15
15
16
+ foreach (var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG )
17
+ # we remove /EHa as it generates warnings under windows
18
+ string (REPLACE "/EHa" "" ${var} "${${var} }" )
19
+
20
+ # we remove -ggdb3 flag as it leads to preprocessor errors when compiling CUDA files (CUDA 4.1)
21
+ string (REPLACE "-ggdb3" "" ${var} "${${var} }" )
22
+
23
+ # we remove -Wsign-promo as it generates warnings under linux
24
+ string (REPLACE "-Wsign-promo" "" ${var} "${${var} }" )
25
+
26
+ # we remove -fvisibility-inlines-hidden because it's used for C++ compiler
27
+ # but NVCC uses C compiler by default
28
+ string (REPLACE "-fvisibility-inlines-hidden" "" ${var} "${${var} }" )
29
+ endforeach ()
30
+
16
31
CUDA_ADD_EXECUTABLE(${the_target} ${OPENCV_TEST_${the_module} _SOURCES})
17
32
target_link_libraries (${the_target} ${test_deps} ${OPENCV_LINKER_LIBS} ${CUDA_LIBRARIES} )
18
33
add_dependencies (opencv_tests ${the_target} )
You can’t perform that action at this time.
0 commit comments