<div dir="ltr"><div>Enabling both mlir and dylib fails on current master (tested with cmake 3.7 & 3.16)</div><div><br></div>> cmake -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON ~/src/llvm-project/llvm<br><div><br></div><div>[snip]</div><div>-- Targeting X86<br>CMake Error at /home/vchuravy/src/llvm-project/mlir/lib/Analysis/CMakeLists.txt:29 (target_link_libraries):<br>  The keyword signature for target_link_libraries has already been used with<br>  the target "MLIRAnalysis".  All uses of target_link_libraries with a target<br>  must be either all-keyword or all-plain.<br><br>  The uses of the keyword signature are here:<br><br>   * /home/vchuravy/src/llvm-project/llvm/cmake/modules/AddLLVM.cmake:608 (target_link_libraries)<br><br>CMake Error at /home/vchuravy/src/llvm-project/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt:16 (target_link_libraries):<br>  The keyword signature for target_link_libraries has already been used with<br>  the target "MLIRAffineToStandard".  All uses of target_link_libraries with<br>  a target must be either all-keyword or all-plain.<br><br>  The uses of the keyword signature are here:<br><br>   * /home/vchuravy/src/llvm-project/llvm/cmake/modules/AddLLVM.cmake:608 (target_link_libraries)<br>[snip]</div><div><br></div><div><a href="https://cmake.org/cmake/help/latest/policy/CMP0023.html">https://cmake.org/cmake/help/latest/policy/CMP0023.html</a><br></div><div>Forcing CMP0023 to OLD circumvents the issue, but it is probably better to fix this in MLIR.</div><div>(However odd it is that CMP0023 is not defaulting to OLD)</div><div><br></div><div>-V</div></div>