hooks icon indicating copy to clipboard operation
hooks copied to clipboard

KB-H019: no warnings if CMake files are in build_modules

Open SpaceIm opened this issue 4 years ago • 1 comments

Sometimes a recipe creates CMake module files for internal usage of conan generators, they are not intended to be included directly by consumers projects, only by files generated by conan generators (they are private CMake module files in a sense). Since conan generators use absolute path of these module files thanks to build_modules/cmake_build_modules, populating builddirs is not required for these files and it may even pollutes CMAKE_MODULE_PATH/CMAKE_PREFIX_PATH of consumers through cmake/CMakeToolchain generators (these generators prepend builddirs of all dependencies to CMAKE_MODULE_PATH & CMAKE_PREFIX_PATH).

Therefore, I advice to not display warnings if a folder not in builddirs contains CMake module files which are all listed in build_modules or the new cmake_build_modules property.

see https://github.com/conan-io/conan-center-index/pull/8869#discussion_r783430618

SpaceIm avatar Jan 13 '22 13:01 SpaceIm

I believe that https://github.com/conan-io/conan-center-index/pull/14066 is encountering the issue identified here. Are there plans to update the hook to eliminate this warning? Thanks

System-Arch avatar Nov 09 '22 17:11 System-Arch