[CMake] Fix for PR 23328: LLVM_OPTIMIZED_TABLEGEN broken
authorChris Bieneman <beanz@apple.com>
Fri, 24 Apr 2015 17:09:20 +0000 (17:09 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 24 Apr 2015 17:09:20 +0000 (17:09 +0000)
commiteb3bc0ba5fae174160ef3822bb5c1fa9e093d410
tree427561f236ce879f2966059c22c523b9f79138c1
parent956b1fff6cb70e5cedbbef886c7172da9000a09d
[CMake] Fix for PR 23328: LLVM_OPTIMIZED_TABLEGEN broken

In CMake dependencies can be filenames or targets, and targets can't be filenames. The Ninja generator handles filename dependencies because it generates targets for every output file from a command. For example:

add_custom_command(OUTPUT foo.txt COMMAND touch foo.txt)

With the Ninja generator this generates a target foo.txt, but with the Makefile generator it doesn't. This is probably because Ninja explicitly requires these hard dependency ties, and Make just behaves oddly in general.

To fix this we need to make the tablegen actions depend on a target rather than a filename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235732 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/TableGen.cmake