cmake_format
cmake_format copied to clipboard
cmake-lint generates false positive E1122 for multiple entries of PATTERN
One of my projects has a couple of instances of this cmake command.
install(
DIRECTORY ${f90dir_BINARY_DIR}
DESTINATION "include"
FILES_MATCHING
PATTERN "*.mod"
PATTERN CMakeFiles EXCLUDE)
This command generates cmake-lint warning [E1122] Duplicate keyword argument PATTERN
even though this is the required syntax for this command. That is, I want to install all of the files matching regex *.mod
while excluding any matches found in the CMakeFiles
subdirectory.
This is just an annoyance, but I wanted to report it to make the issue searchable. It can easily be suppressed with # cmake-lint: disable=E1122
. If there is a better way to write this instruction, please let me know.