Misleading licensing comment in build/opencv_modules.hpp

Dear Community,
when building from source, the generated file in “build/opencv2/opencv_modules.hpp” says:

/*
 *      ** File generated automatically, do not modify **
 *
 * This file defines the list of modules available in current build configuration
 *
 *
*/

// This definition means that OpenCV is built with enabled non-free code.
// For example, patented algorithms for non-profit/non-commercial use only.
/* #undef OPENCV_ENABLE_NONFREE */

#define HAVE_OPENCV_CALIB3D
#define HAVE_OPENCV_CORE
#define HAVE_OPENCV_DNN
#define HAVE_OPENCV_FEATURES2D
#define HAVE_OPENCV_FLANN
#define HAVE_OPENCV_GAPI
#define HAVE_OPENCV_HIGHGUI
#define HAVE_OPENCV_IMGCODECS
#define HAVE_OPENCV_IMGPROC
#define HAVE_OPENCV_ML
#define HAVE_OPENCV_OBJDETECT
#define HAVE_OPENCV_PHOTO
#define HAVE_OPENCV_STITCHING
#define HAVE_OPENCV_VIDEO
#define HAVE_OPENCV_VIDEOIO

even though I specifically did not use the nonfree code by not passing “OPENCV_ENABLE_NONFREE” to cmake and I also do not think that the above module list contains nonfree code.

Am I correct to assume that the comment “/* #undef OPENCV_ENABLE_NONFREE */” indicates that NO non-free code is built? This is a bit misleading, because the comment states " This definition means that OpenCV is built with enabled non-free code."

Cheers

correct

absolutely

however, imho you’re safe to ignore this issue.
to enable nonfree code, the flag has to be set at build time of the libraries

the purpose ofopencv_modules.hpp is to look up available modules,
when you build your own program (it’s machine generated)
toggling the flag there will have no effect at all.