Full details: https://gist.github.com/kinchungwong/2a85d3ac5a5c61960780cf6a336864e9
This is from a clean clone from GitHub branch 3.4 The CMake error can be reproduced when running CMake on the clean clone.
The VS solutions and project files are not being generated, therefore it is a blocker issue for me.
If I turn off the BUILD_TESTS
flag, then CMake will run without error, but I need to build the tests.
I'm not familiar with CMake scripts, but I tried my best to find out why "FP16" has to do with the error. I'm not able to find any clue. There aren't occurrences of the string "FP16" throughout the CMake scripts, except when it occurs as part of the list of CPU features. However I don't see any CMake errors about other CPU features.
In order to track down this issue, I have written down some advice, the first of which is to enable more logging in the CMake script.
Note that, "CMakeFiles/CMakeOutput.log" or "CMakeFiles/CMakeError.log" do not contain the relevant information at all.
opencv_core: ocv_create_module( )
ocv_add_precompiled_headers( opencv_core )
ocv_add_accuracy_tests( )
__ocv_parse_test_sources( TEST )
ocv_target_include_directories(opencv_test_core C:/Users/username/git/opencv/modules/ts/include)
CMake Error at cmake/OpenCVUtils.cmake:322 (target_include_directories):
Cannot specify include directories for target "opencv_test_core_FP16" which
is not built by this project.
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:672 (ocv_target_include_directories)
cmake/OpenCVModule.cmake:1214 (ocv_target_include_modules)
modules/core/CMakeLists.txt:75 (ocv_add_accuracy_tests)
Full details: https://gist.github.com/kinchungwong/2a85d3ac5a5c61960780cf6a336864e9