[cmake-developers] Adding Ninja file dependency to ExternalProject target

Chris Bieneman chris.bieneman at me.com
Fri Nov 6 17:16:52 EST 2015


Hi cmake-developers,

I’m working on a patch to LLVM to support running our clang test-suite using ExternalProject. The complication here is that we want to configure the test-suite’s CMake build with the clang that is produced from the LLVM/Clang build.

In my patch I try adding a dependency on clang to the ${name}-configure target using add_dependencies. The problem is that in the generated Ninja build file the dependency on clang is an order-only dependency, not a file dependency. Being an order-only dependency means the target won’t be re-executed when clang changes, so we can’t re-run the test suite after a change to clang.

I’ve attached my WiP patches, what can I do to make it so that when USE_CLANG is set the external project will have a file-dependency on clang?

Thanks,
-Chris


-------------- next part --------------
A non-text attachment was scrubbed...
Name: external-proj.diff
Type: application/octet-stream
Size: 6599 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151106/8d1457bf/attachment.obj>


More information about the cmake-developers mailing list