Ask Your Question

add a new test file to OpenCV source

asked 2013-07-22 21:42:59 -0600

mat_pier gravatar image

I'm trying to contribute to the source code. I have written a new feature. It got compiled properly and is working as expected (after I run make; sudo make install).

I wrote a test file in opencv/modules/module_name/test/test_abc.cpp

I also enabled BUILD_TESTS before running make.

However, when I run make the new test file doesn't get included.

What am I missing? Where do I tweak settings so that the my test file is included?

edit retag flag offensive close merge delete


is that a new module ? e.g core/cmakefile.txt has a line : ocv_add_accuracy_tests()

without args, it should add the contents of the module's test folder (*.hpp *.cpp)

it's defined in opencv/cmake/OpenCVModule.cmake, L665

berak gravatar imageberak ( 2013-07-22 23:39:03 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-07-22 23:53:11 -0600

Vladislav Vinogradov gravatar image

Each time you add new file you need to rerun CMake. CMake will add the file to build rule.

edit flag offensive delete link more

Question Tools


Asked: 2013-07-22 21:42:59 -0600

Seen: 174 times

Last updated: Jul 22 '13