https://reviews.llvm.org/D128230 updated the mlir python configuration to depend heavily on interface libraries and their properties. Unfortunately, some of these are not available in cmake 3.15 (which is the lowest supported version for mlir). This change modifies the setup of the interface libraries to work in cmake 3.15.
More specifically, the issue is that both INCLUDE_DIRECTORIES and SOURCES are only supported on interface libraries in 3.15 in their "interface" versions, so we cannot set plain INCLUDE_DIRECTORIES and SOURCES. We were setting these to work around the fact that we "build" the mlir sources targets at configuration time (instead of build time) and the generator expressions are not yet evaluated at that point. This change removes these "plain" variants of the properties and instead adds custom evaluation for the generator expressions. This is not really great (neither was the other workaround, really), so we should plan to upgrade to FILE_SETS or similar as soon as possible (which depends on requiring a much newer version of cmake). Other options include always copying the python files instead of creating symbolic links.
This change also fixes a dependency issue between the python files generated through tablegen and the targets that copy the files. The dependency was previously implied via the SOURCES property, however, there really should be an explicit target dependency per the cmake documentation (see the OUTPUT property of https://cmake.org/cmake/help/latest/command/add_custom_command.html).